Strange artifacts in pixel art when in fullscreen

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

I am working on an NES-style project in Godot 3.1 beta 9.

My native resolution is 256x240 and my sprite size is 16x16. I have use_pixel_snap set to true, display/window/stretch /mode set to 2d, display/window/stretch/aspect set to keep.

I notice that when I enter fullscreen, however, my player sprite has some strange pixel artifacts. It largely looks like it is supposed to, with the 16x16 sprite cleanly scaling up.

Unfortunately, sometimes there are a few stray pixels where they shouldn’t be. If I move the player a little, they either go away, or change to new positions. I notice them more frequently when my sprite is facing left (during which the spite has flip_h = true), but I also notice them periodically when moving right.

Here is an example:

(I had to take this photo with my phone, since Windows screencap doesn’t work when Godot is fullscreen.)

The sprite should look like this:

What is causing these artifacts and how do I get rid of them?

I have confirmed that I have imported my assets using lossless compression.

I’m no 2D expert. My idea is just that you check the import setting for the texture. It should be lossless. (Maybe check also the defaults in the project preferences)

You might try also going with the latest beta: Dev snapshot: Godot 3.1 beta 9
Especially if your project renders on GLES2.

These all are just guesses. Might help might or not change anything.

wombatstampede | 2019-03-01 08:01

Are you use Camera2D?

Jimmy | 2019-03-01 17:23

Yes, Camera2D, no scrolling.

Diet Estus | 2019-03-01 21:11

Updated to Godot 3.1 beta 9 and confirmed I have imported my assets using lossless compression. The problem persists.

Diet Estus | 2019-03-02 03:54