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.
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.
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?
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.