I wanna get some old art style (256 color, dithering, etc) in modern OpenGL in an effective way. Maybe using a low resolution (320x240) rendered at a bigger space so that the pixels looks "bigger?" I'd just like to fake this old style on modern GPUs.
-
1\$\begingroup\$ Color palettes and upscaling your 320x240 image to your (most likely) 1920x1080 screen can easily be done in a postprocessing shader. A toon shader/cel shader should be a good starting point. \$\endgroup\$– tkauslMar 3, 2019 at 23:53
-
\$\begingroup\$ So you talking about render the scene in a 320x240 buffer and after render like a image in bigger resolution... This would be a opmized way to do in Real time? \$\endgroup\$– GobbsMar 4, 2019 at 0:06
-
4\$\begingroup\$ All of your questions have been answered elsewhere, low resolution, limited colors, and although not on an SE site, there's a blog post about dithering \$\endgroup\$– BálintMar 4, 2019 at 0:59
1 Answer
To get pixelated look, you can use OpenGL's framebuffer functionality to render to texture (glFramebufferTexture2D etc.), then draw that texture as a rectangle with nearest-neighbour scaling.
-
2\$\begingroup\$ This answer would greatly benefit from a short example! \$\endgroup\$– Vaillancourt ♦Apr 4, 2019 at 12:48