Enabling Pixel Perfect Camera Causes Flickers

I am adding pixel perfect camera to my game. But when I enable it, moving the cursor in and out to game view causes flickers. When I disable it, same problem does not occur. Also, flickering does not happen in play mode.

Btw, I have 2 different versions of Pixel Perfect component. I am using the first one, second one does not work properly. I don’t know why there are 2 different versions of it.

Unity version: 2022.1.14f1
Pixel Perfect version: 5.0.1
CineMachineVersion: 2.8.9

8446337--1120031--pixelperfect_1.JPG
8446337--1120034--pixelperfect_2.JPG

Something you are setting in code is fighting with what per pixel needs to do, I think, probably fov or something?

1 Like

Thanks for the reply. I created this scene which has only camera, cinebench and a sprite and problem still occurs.
I created 2 different projects for 2D and 2D URP. Flickering problem occurs in 2D URP one.

Edit: Since there is no problem in play mode(as far as I know), I can solve this problem by enabling the pixel perfect component in a script. But it is a bit annoying visual bug. :smile: I am open to solutions to fix this problem.

8446424--1120052--pixelperfect_sample_scene.JPG

Sounds like an urp bug then. Not sure what cinebench is.

Thanks for your messages! Cinebench is a camera package that has a lot of options and features for different camera scenarios.

You mean Cinemachine?

Yes, I mean Cinemachine, sorry what I had thought and what I wrote is completely different. :slight_smile:
Problem can be repeated with only cinemachine 2d and camera(both pixel perfect component attached) on a 2d URP project. Even if you don’t have any other objects in the scene, edges of the screen flickers.

Unity version: 2022.1.14f1
Pixel Perfect version: 5.0.1
CineMachineVersion: 2.8.9

1 Like

Hi @OguzhanBozkurt28 , I believe it’s a bug with the Pixel Perfect Camera fighting with the editor scene’s camera. Can you report the issue and attached your project so we can track it.

disable cinemachine

for anyone reading this still, try setting the priority in the cinemachine camera higher and that should do it.

Good day! I faced the same error, any news on this problem? Cinemachine is perfect for my project(

i tried different values(100, 11, 100000, -11, -1, 0 and so on) but none of it helped

Hi @P_e_t_a_c_h_e_k , I’ve submitted a fix for this issue. Which version of unity are you on? I’ll update this thread when a new build is published with the fix.

1 Like

Hi, I tried on version 2021.3.12f there was this problem, but when I updated the project to version 2022.2.1f1 this problem disappeared.

The fix has landed in 2021.3.17f1 and 2022.2.3f1. Let me know if you’re still having the same issue.

is there a way to install the fix in previous versions?