I’m working on a 2D Pixelart platformer game and it’s become a real pain to do this in Unity.
At first I was using the PixelPerfectCamera and let it upscale the render texture so that the whole scene is renderered to a rendertexture the size of my resolution(480x270) which then is scaled back to full screen, this looks real great because everything in your scene will be ‘pixelated’ because it’s actually rendered at a smaller resolution. But the big downside to this all is that all movement(player, camera, moving objects) looks real jenky especially with faster movement. I’ve managed to get it somewhat smoother but in the end it still looks bad.
So then I asked myself, do I really need all the pixelart lined up on a pixel grid? And the answer is no, noone will notice that the pixel don’t all line up every frame. So I disabled the ‘upscale rendertexture’. Now the movement looks great but the big downside is that my linerenderers, 2D Lights and ParticleEffects now are no longer pixelated.
For normal sprites I ended up creating a shader which pixelates a sprite according to my PPU so I can rotate them without having to create a spritesheet for the whole rotation. Only downside to this is that the sprites I want to rotate this way cannot be in an atlas because then you see parts of neighbouring sprites in the atlas.
For 2D lights I thought I could just make a custom render pass which applies my pixelate shader after the 2D lighting pass. But it’s impossible to inject a pass for 2D, I found out that I can only inject a pass before everything is rendered, or after everything is rendered. So that won’t work either.
For the LineRenderer I haven’t found anything, for lines that are either vertical or horizontal I can make them look great, but as soon as you go diagonal it looks awefull. There is someone who created a pixelated linerenderer library for Unity but that only works for solid colors and you can’t use materials so that’s usable for some lines but not for all.
I’ve read enough forum posts on here and other sites to know that there are a lot of people running into these problems. Can you please put these things on the roadmap so that creating pixelart games becomes easier?
So a way to pixelate the LineRenderer, 2D Lights and Shadows and Particle Effects.
I understand that it won’t be fixed right away, but at least put it on the roadmap so it will be in eventually.