Graphical artefact in middle of sprite

I’ve noticed three minor artefacts in my sprite where a straight line ‘steps’ out by one pixel. It’s not an extrude borders problem because it’s in the middle of the sprite, not the edge and, well, I’m already extruding borders in the atlas.

I recall this being mentioned in a previous thread a while ago but can’t find it. Any hints appreciated… thanks.

artefact

Does it happen with this shader? Smooth Pixelart Scaling

Other method is https://github.com/britzl/lowrezjam-template

I get different, more severe artefacts with the sprite_smooth_pixel_scaling material:

What does the atlas look like for those sprites?

Turning on Subpixels in game.project seems to correct the issue so I’ll use that for the time being.

Here’s the atlas:

2 Likes

I have to say it sounds really weird.
Do you perhaps have a minimal repro case you can share for this?

1 Like

Here’s a very simple example. The only differences from a blank project is filtering is set to nearest, subpixels are disabled and a custom render script is used to scale up pixels x 3. I suspect the render script is at fault but don’t know enough about them to draw a solid conclusion.

gfx_shear_example.zip (3.0 KB)

2 Likes

Hmm, I don’t see an issue with the project (macOS). Here’s a screen grab, perhaps I missed something?

That looks okay. Here’s what it looks like from my Windows machine
You can actually draw a line through the 3 glitches and from corner to corner so that might be a clue…

Ok, we noticed that in the last shot, the tear is aligned with the sprite’s diagonal.
And I cannot reproduce it locally (on my Windows 10 via Parallels Desktop).
When we generate our sprites, we calculate four corners, and then assign these values to 6 vertices, so we know they share the same values. This leads us to believe it’s partly driver related. E.g. the sprite is positioned on x=213, the texture size is W=427.

Will it help if you align it on an even coordinate and make it W=428 instead?

3 Likes