@Nanites said:
Hi,
is there a way to use Antialiasing for 2D Objects (Polygon2D, Line2D and such) and glow?
I have a WorldEnvironment node for the glow effect right now, and turned on the antialiasing.
However AA only works with either HDR off or Framebuffer Allocation = 2D in Project Settings/Rendering/Quality which also disabled glow.
From what I remember, Antialiasing for 2D isn’t implemented for 2D draw functions (lines, polygons, etc) currently. I think there are plans to add this eventually, but last I knew this isn’t currently implemented, at least not in the 3.X branch.
Not sure on the glow shader, but what you could try doing to simulate glowing is adding another polygon/sprite/etc and giving it a ShaderMaterial with the mode set to add
. Then you can have it display behind the object you want to glow (make it a child and enable draw behind parent
in the visibility settings). For the texture itself, you want to use a slightly blurred version of the original shape.
I’ve done this many times with sprites to get a glow effect only on certain sprites and in GLES2, so I can say it works pretty well. If you want, I can show you a quick example of how it works for 2D sprites. I’m not totally sure it will work with 2D draw functions, but it might be a way to get a similar effect easily.