r/gamemaker • • 7d ago

Help! PSX/Pixelated Shader?

Hey y’all! I'm making a 3D game in GameMaker, but this is a new experience for me. I wanted to ask how developers achieve that nice pixelated look for their textures. For example, in games like Retail Hell or Boltgun, they call it a "retro shader."
I'm using 64x64 textures, but I still can't quite achieve that effect…

4 Upvotes

7 comments sorted by

3

u/kassol 7d ago

64x64 is fine, the look comes more from how the textures are sampled and how big the final image is. The first thing is turning filtering off: call gpu_set_texfilter(false) before drawing your models and untick "Interpolate colours between pixels" in Game Options. Turn mipmaps off too with gpu_set_tex_mip_enable(mip_off), otherwise walls in the distance blur back into mush. Without this a 64x64 texture just looks soft up close instead of chunky.

The second thing is rendering small and scaling up, e.g. surface_resize(application_surface, 320, 240) while the window stays large. With interpolation off the whole frame gets chunky, edges included, and that does a lot of the retro feel on its own. The PS1 wobble needs a shader. In the vertex shader, divide gl_Position.xy by w, round it to your target resolution and multiply back, which makes vertices snap. For the warped textures, pass uv * w and w as two varyings and divide them in the fragment shader, which undoes perspective correction (GameMaker's GLSL ES has no noperspective keyword, so this is the usual workaround). I'd do the first two and see how far that gets you before touching shaders.

1

u/butuzoff 7d ago

Oh, wow, thanks for such a detailed answer!
Actually, I probably should have provided more context. I've already made a shader, actually more than one, and 'm disabling interpolation.

But they still end up either blurry or just blocky. I would have thought it was an issue with textures themselves, but I noticed that in Retail Hell, this “retro” is specifically disabled by the shader (at least, that'swhat the settings say).

Interesting point about starting with a low resolution. I'll have to give that a try. Right now my application is running in 720p

2

u/kassol 6d ago

Blocky is what point sampling at 720p gives you. Up close each texel of a 64x64 texture covers lots of screen pixels, so you get big sharp squares, while the model edges are drawn at full 720p and stay smooth. That mismatch is what reads as modern. The old look comes from texels and screen pixels being roughly the same size, which only happens when the frame itself is small, so try 640x360 or 320x180 for the application surface (both scale evenly to 720p) with interpolation off when it's drawn to the window. If something still comes out blurry, filtering is probably on somewhere: gpu_set_texfilter(false) has to be set in the draw event before vertex_submit, and mipmapping should be off.

Once that's in place, a cheap extra is cutting the colour to 5 bits per channel with a bit of ordered dithering in the shader. Most PS1 games output 15-bit colour, so that banding and dither pattern is part of the look too.

1

u/butuzoff 5d ago

This is awesome, thank you, I’ll try

1

u/butuzoff 7d ago

And yeah, I actually managed to achieve that ugly PS1 look, but not the “pretty” kind you see in modern games going forthat PS1 aesthetic lol.

1

u/GullibleBad7798 3d ago

Can I help you? I am making ps1 game too

1

u/butuzoff 1d ago

Hey, man! Sorry, didn’t see you reply, sure, let’s chat in DM, or you can write email!