Screen UV breaks when Custom Pass is set to Before Post Process

I’m having a problem with the screen UV when using Custom Pass set to Before Post Process. To get it to work again I have to restart Unity, switch screens, disable Interface (or do something completely random).
I am using Unity 2021.2.16f1 and the latest HDRP.
It breaks more often when different screens have different resolutions. I use 3 monitors. Two full hd and one 2k.

How to reproduce this problem: Download HDRP-CustomPasses, open Scene HINTS, change Custom Pass to Before Post Process, change Game or Scene view size.

Correct screen:


Broken, with squished UV. See tear on right side:

Broken scene view:

Thanks for your time!

If you are using dynamic resolution, this can be the cause…

1 Like

Thanks for the hint. In my project the dynamic resolution was off, but this pointed me in the right direction. For screen UVs, turning off Rought Distortion helps, but that causes SampleCameraColor to ignore transparent objects so I’m turning one problem into another.