Textures very rough looking in Compatibility mode

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By PolyBytes

So to make a long story short, I am currently participating in a game jam and one of the requirements is to be able to export for Web so that it can be hosted on itch.io. Because of this we are forced to use the Compaitibility mode because it is the only one that supports Web exports in Godot 4 from what I can tell?

We are making a 2D side scrolling game. The textures look great until they are in-game and the lack of anti-aliasing is very prevalent. According to the tooltips in the anti-aliasing menu, none of the different types of AA are compatible with the Compatibility rendering mode.

Bad texture visuals with no anti-aliasing.

Is there anything I can do to make the textures look better in-game? The jam has 2 days left and we are trying to polish as much as possible.

Thanks!

edit: Only 11 hours left in the game jam, would really appreciate some assistance if anyone is knowledgeable on this subject matter!

:bust_in_silhouette: Reply From: PolyBytes

I am bumping this topic since it hasn’t gotten any answers yet.

Same, I’d be looking for this too. Right now I’m looking into post-processing shaders in Godot, so I’ll see if I can find an answer and report back

The issue OP is encountering here is not a lack of antialiasing. It’s a lack of mipmaps, which results in textures looking grainy when downscaled by a significant factor (usually more than 2x).

To save memory, Godot doesn’t generate mipmaps for textures by default unless they are used in 3D. This is because in most 2D projects, camera zoom won’t vary much, so as long as your assets are in a suitable resolution (compared to viewport resolution), there isn’t much of a need for mipmaps.

You can enable mipmaps for textures in the Import dock after selecting them in the FileSystem dock. Doing this increases memory usage for textures by about 33% and can result in them looking blurry when downscaled though. Mipmap bias can be used to alleviate this blurriness, but it’s only available with the Forward+ and Mobile rendering methods, not Compatibility.

Alternatively, reduce the size of your 2D assets before importing them. This will make them look less grainy while also using significantly less memory.