_ScreenParams is affected by RenderScale

float2 screenUV =  i.positionCS.xy / _ScreenParams.xy;

I have a UV position information. If I modify the RenderScale to be not 1 in the URP settings, the obtained position information is incorrect.

If my *RenderScale modified value is correct. I don’t want to pass in RenderScale externally. Is there a better way?

    float2 screenUV = (i.positionCS.xy / (_ScreenParams.xy * _RenderScale));

Thanks in advance

Use _ScaledScreenParams

3 Likes