Solving pixel art weirdness on Windows target

This is something I am noticing that seems to only impact Windows builds (may impact other targets but I’ve only tested Win/Android/HTML5).

It doesn’t happen on Android, doesn’t happen in HTML5. Only Windows…

Here you can see the top of the white outline is obviously weird. This is at 2x the base scale.
2018-07-21%2013_19_51-Window

Here you can see that part of the eye looks weird. This is at fullscreen mode.

But then here is HTML5 target also in fullscreen mod, so the same res. No flaw in the pixels.

The sprite is positioned at an even number.

Any idea how to fix this? I have tested making everything highp in the sprite shaders and it had no effect.

As soon as I posted this I realized for defos I was setting the Window size and not the View size… so here is the 2x version, it looks correct.

But then why does the HTML5 version look fine but not the Windows version?

1 Like

I’ve had similar things happen to me for pixel animations. Rescaling the window after starting the game (even by a pixel or so) immediately solves it, so definitely strange.

HTML5 build can have the pixel weirdness too. I think the main issue is how the rendering is done. All pixels from every layer are not merged at the smallest resolution like they probably should be, then stretched to fill the screen in a render target as a single texture.