Anti-aliasing in 2D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mateusak
:warning: Old Version Published before Godot 3 was released.

Left: Godot with everything disabled, Middle: Photoshop, Right: Godot with everything enabled

Is there any way to get the middle result from Godot?

I was looking onto FXAA and SMAA on the internet, is it possible to rewrite those as shaders in Godot? If so, how?

Looks like subpixel anti-aliasing. I have a really dumb idea which is to render your game with the example on the left, but on a render texture bigger as twice the screen size. Then draw it at half the size on the final screen, this will “smooth” everything.
But there must be a better low-level way of doing this^^"

Zylann | 2017-04-21 20:51

I’ve been studying AA since tomorrow, and that is basically SSAA isn’t it? They say that’s pretty expensive.

mateusak | 2017-04-22 13:21

That’s why I say it’s really simplist (that’s what you did to your screenshot, right?). I’m curious to know about other techniques, maybe there are post-processing shaders or hardware API functions that can achieve this too.

Zylann | 2017-04-22 17:34