godot-antialiased-line2d icon indicating copy to clipboard operation
godot-antialiased-line2d copied to clipboard

Update the add-on for Godot 4

Open crysan opened this issue 2 years ago • 3 comments

Hi! Is work in Godot 4 beta1?

crysan avatar Sep 16 '22 07:09 crysan

Godot 4.0 offers 2D MSAA support, which works with any kind of 2D drawing. This includes Polygon2D and Line2D, but also TextureProgress and custom 2D drawing. It also works great for both opaque and translucent rendering. You can enable 2D MSAA in the advanced Project Settings in Godot 4.

There are a few caveats with 2D MSAA though:

  • 2D MSAA is currently not available in the Compatibility (OpenGL) rendering method.
  • 2D MSAA is more expensive than the antialiasing approach used here, especially at higher quality levels. It gets proportionally more expensive as the viewport resolution increases, especially on integrated graphics.
  • 2D MSAA is "all or nothing": you cannot choose to apply it to certain nodes only, though you can toggle it on a per-Viewport basis. This add-on gives you more control by allowing you to toggle antialiasing on a per-node basis.

Given the above caveats, I will update this add-on to work with 4.x in the future, but I can't give an ETA.

Calinou avatar Feb 24 '23 23:02 Calinou

@Calinou also it seems like MSAA doesn't work in HTML5 (unless I'm missing something, it doesn't seem easy to find info for this).

Not sure how compatible it'd be with this method, having multiple nodes that use clipping(/canvasgroups) seem to be able to easily reduce FPS particularly with x8MSAA.

also it seems like MSAA doesn't work in HTML5 (unless I'm missing something, it doesn't seem easy to find info for this).

This is because MSAA hasn't been implemented in the Compatibility rendering method yet.

Calinou avatar Oct 12 '23 19:10 Calinou