Unity doesn’t seem to be able to handle Pixel Perfect Graphics correctly, no matter whether you use CInemachine or not. I’ve read other forum entries but none of them had solutions of they didn’t describe the problem correctly.
Problem:
When using Pixel Perfect Camera with Upscale Render Texture, there will be jitter when following a moving object. It doesn’t matter if the object is moved by physics or not (in my video examples I move the character with physics, but I also tested with moving a square sprite using its transform)
Minimal reproducible example:
Download the file below, press play and observe. Camera is child of the moving player, you can unparent it and make a follow script, but the error will still be there. This is the simplest setup.
Jitter2D.zip (67.6 KB)
What have been tried:
I made sure the whole project is well configured. I followed Unity Manual, all my assets are 16PPU (my tilemap tiles arre 1616 and my bird sprite is 32*24 pixels (the spritsheet is 224216). I also tested using a 16*16 square sprite.
All the sprites have the pivor point mode set to pixel.
I tried using a correction script to snap cinemachine to pixel perfect positions after the body stage, but that didn’t work.
I tried to analyze what is happening by setting Time.timeScale to 0.1 from project settings, the camera seems to go backward and forward depending on the position. It seems to be rounding issues but I’m not sure because if it were that my snapping script with cinemachine should have worked.
It’s my first time using this forum so I attach the videos as a zip and also as an embed from drive:
Issue also without cinemachine
Videos.zip (6.4 MB)
I’m aware that Cinemachine docs says that there are limitations when using Upscale Render Texture, alright… But why is the issue present with the normal camera too? Is it absolutely impossible to have a perfect camera with pixel perfect setup?
This issue is driving my crazy since pixel perfect graphics are important to me