How to pixelate a 2D game in Godot?

370 views Asked by At

So I am making a 2D Godot game and I think it will be useful if I can pixelate the whole viewport. Maybe I need a canvas_item shader, but I have no idea how to do it. Can someone explain how to do it and why it works?

1

There are 1 answers

0
Yanb On BEST ANSWER

I've figured it out myself by experimenting with the parameters.

Note: this method doesn't use any interpolation.

There is a Window tab in the Project Settings, and there are size properties in it. I needed to reduce that size by some number - the size of the pixel, like if my screen is 1920x1080, and each pixel is 10x10, then I set the size to 192x108.

Then I set the Stretch mode to viewport to pixelate.

And now it works just fine.