- Home /
How to simulate/display 2D pixelated graphics?
Is it possible to render say a 320x240 window at 640x480 and just double up the pixels? I'm going for a retro feel; In flash I just render everything to a Bitmap object and scale it up; was thinking it might be possible to somehow "render" to a Texture/Mesh (still learning unity sorry) and then just scale that up...
I did find this: http://answers.unity3d.com/questions/26853/can-i-scale-up-screen-pixels but it's only for Unity pro
This is just for a 2D platformer (Think Sonic 1 :-p, but not... heh)
Thanks, Chris
Answer by Jessy · Feb 01, 2011 at 01:44 PM
Any texture that you want to look like that, just use Point filtering. I don't have Unity Pro, so don't have experience with Render Textures, but I assume that would work. What is the exact effect, here? You want to use 3D models, but have their edges sampled at a frequency much lower than what the screen resolution offers?
I guess what he want is a post effect. just to get a effect like this: http://www.pixelgraft.co.uk/wp-content/uploads/2007/08/pixelate.jpg
Yep; although it seems a waste to get the GPU to do all that hard work and then remove it -- I've seen a bunch of 2d platformer games that have what appear to be low resolution and then scaled up; was just wondering how they were doing it.
Point filtering seems to do the trick; at least to get pixellated textures! Just have to figure out the coordinate system to achieve a 320x240 feel :-D.
Had a further play with this and I think I'll end up scripting the camera to do it all automatically; trying to tweak the camera using the editor just doesn't seem to get it right... I'm also not sure what scale to use; Whether to use a scale of 320x240 or use 1/320 x 1/240... it seems there's some limits on the values Unity will use...
I'm not sure what you mean by that. Are you just having problems with integer division? Those fractions are equal to zero unless you put the letter F after them.
Answer by e-bonneville · Feb 01, 2011 at 03:26 PM
No, Unity doesn't work like that, sorry. You have to manually create all the textures at a low resolution if you're going for a pixelated effect.
All my graphical assets are already scaled for 320x240; This is purely for 2d not 3d;
Answer by thomasfriday · Jul 13, 2021 at 08:45 AM
Here's a short Youtube video that covers exactly how to get a pixelated look: https://youtu.be/Sru8XDwxC3I

Your answer