2D Sprite Aliasing/Jagged Edges – Exhausted All Common Solutions

Godot Version

Godot 4.5 Stable

Question

Hello,

I’m reaching out after extensive searching through existing threads without finding a working solution. Our studio is working on a project featuring a large amount of 2D flat art (similar in style to Fish Tycoon 2), and we’re experiencing noticeable aliased/jagged edges on our sprites. All assets are in .png format.

What we’ve tried so far:

  • Setting the texture filter to Linear and enabling mipmap generation

  • Changing the project stretch mode to Canvas Items

  • Exporting assets at 4× their in-game size, using power-of-2 dimensions

  • Replacing Sprite2D nodes with TextureRect and experimenting with different Expand Mode and Stretch Mode settings, since UI elements tend to render smoother

  • Switching the rendering backend from Compatibility to Forward+

  • Exporting assets at their exact in-game pixel size (1:1)

  • Adding lights on the same light layer as the assets to reduce contrast between them

  • Brightening the background with linear rendering to minimize the visual impact

  • Enabling MSAA and Screen Space under anti-aliasing settings

None of these approaches have resolved the issue satisfactorily.

My question: Is there a known, reliable method for achieving clean edges on 2D flat art in Godot? Or is this a recognized limitation of the engine for this particular art style?

I’m unable to share the actual assets, but again, the visual style is very close to Fish Tycoon 2 for reference.

Environment:

  • Godot version: Godot 4.5 Stable

  • OS: Windows 10

  • Renderer: Tested both Compatibility and Forward+

Any guidance would be greatly appreciated. Thank you.

1 Like

You’ll have to post some visuals; what you’re getting vs. what you’re expecting to get.

3 Likes

I haven’t had this issue with my artwork in Godot yet, so I can’t really tell what you mean by the edges.

Even if you can’t share an actual image, you could share an image with a sprite that shows the issue you are asking about.

1 Like

Excuse me if it was too little to share
basically looking at this asset right here you’d see that the outline of the asset is kind of gritty or rough around the edges and meanwhile this is a barely noticeable problem on a laptop screen I believe on larger screens it will just look like we’re implementing an asset that is pixelated around the edges.
Loading the same asset on, let’s say, figma, or photoshop wouldn’t show the same grittiness and meanwhile I do realize they have different rasterizing algorithms I wonder if there’s a work around for this to make it render smoother around the edges.

If this is a pixel image then no rasterizing really takes place. It’s just sampled and displayed. If it’s displayed in 1:1 size then it should look as in any other program. If you upscale then the pixels will be linearly interpolated which may look slightly worse than in programs that use cubic interpolation.

Make your assets large enough so no upscaling ever happens.

You also might want to disable vram compression in texture’s import options.

What’s your window stretch mode btw?

I think in this case they are downscaling the assets (correct me if i’m wrong)

Make a new empty/default Godot project, drag one of the .pngs into it and put it in a Sprite2D. If it doesn’t look right, in my experience what you’re seeing is a problem with the art.

If it looks right, you’re going to have to track down the shader or whatever is causing the strange edge problems. Consider rebuilding one of the object visuals a single node/property change at a time to isolate which change creates the effect you dislike.

Looking at the sample image. Do you mean the artifacts along the edges like here in this closeup?

1 Like

Is that AI poisoning noise (e.g. Glaze/Nightshade)?

  • Have you tried other textures than your own? Get some similar images from internet and check how their edges look.
  • Set the sprite’s position to integer coordinates. For example, position x=420, y=253 instead of x=420.123, y=253.987634.
1 Like

Don’t use Photoshop if exporting .png format it leaves artefacts in image use Gimp else export as a bmp file from photoshop then use gimp or imagemagik to convert it.

Hey, Sorry for late reply.
Yes the image here is displayed in 1:1. No upscaling whatsoever is taking place here.
I will go ahead and disable Vram compression import settings and try it out. Then get back with feedback on the issue!

Nope, no downscaling or upscaling in this picture. But it’s safe to assume as earlier in the project I was doing so and I was thinking that’s the root of my problem as well.

That’s sounds like a solid debugging suggestion, I will try it out and get back with feedback thank you!
And yes these artifacts along the edges is what I mean. I was afraid that on large displays they will be exaggerated and it will impact the over all smoothness of the looks.

I don’t know if I’m quite sure of what you’re referring to, but if you’re pointing at a certain shader visual on top then I have no shaders whatsoever. Only a light on top of the scene at a very low Energy.

I have tried different textures but all are made within the studio so I will try to check on the internet for some other textures to see if it’s rooted in the texture making. And does the coordinate being float have to do with how the engine view an asset because I do have a sort of positioning system that doesn’t take into regard the asset being placed on float coordinates.

We use neither, but I’ll consider checking in with the software we use to make our arts. Thank you for your recommendation!

Sorry I just noticed that I overlooked a question, my window stretch mode is canvas_items

We’ll need 1:1, side by side comparison of Godot screenshot and some image editing app screenshot.

Hi! I’m the Artist from the team. Our Assets do not get glazed or have an anti-ai filter on them. :sweat_smile:

1 Like

Make a small sample image and post it here.
We can help a lot better if we are all working from the same source.