How do I upscale a pixel game without being blurry?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By user41420082
:warning: Old Version Published before Godot 3 was released.

I set a small width and height for my project and then enlarge the game window using OS.set_window_size(). This works and my small graphics are upscaled on a larger game window. However, the graphics are blurry. How do I make the graphics not blurry then? Or even in the editor, I notice that it’s blurry. How do I disable it overall on Godot?

:bust_in_silhouette: Reply From: user41420082

Figured it out, I thought it was okay to just copy PNG files to the Godot directory because that’s what I read when trying to import it. Turns out I actually have to import it with only No mip map checked. Not copy the PNG file.

Still weird. My game exclusively uses PNGs straight away without importing, and I get non-blurry pixel-art (with filter and mipmaps disabled by default).

Zylann | 2016-10-08 13:23

You can disable mipmaps & filter in the project settings. This should make sure all images have those options disabled by default.

zyrixian | 2016-10-09 23:11

:bust_in_silhouette: Reply From: Zylann

Actually you can copy/paste PNGs directly without going through import, and still get the options you want.
You have blurry options because that’s the default, you can change it.

Go to Scene → Project Settings → General, Image Loader, then uncheck filter and gen_mipmaps. Once you’ve done that, Godot won’t add mipmaps or filters on images by default.

I had those checked and they were still blurry

user41420082 | 2016-10-07 16:39

That’s because they were imported before you checked these boxes. You have two options for previously imported images:

  1. If you imported images as .tex, you have to modify their import options for each because Godot saved these inside the asset file.

  2. If you pasted them into the project as .png, you can remove the .png.flag file alongside them, if any (they override the defaults).

Zylann | 2016-10-07 18:41

Ohhh, I didn’t know about that. I originally tried to uncheck filter and gen_mipmaps to no avail so I just gave up on them and looked for another way. Apparently, I didn’t notice the .png.flag files.

user41420082 | 2016-10-08 02:30