Skip to content

Commit

Permalink
fix: soft mask is upside down on some devices
Browse files Browse the repository at this point in the history
close #185
  • Loading branch information
mob-sakai committed Aug 16, 2024
1 parent d5568b8 commit 6e2ad42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Packages/src/Shaders/SoftMask.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ float2 ClipToUv(const float2 clipPos)
#if UNITY_UV_STARTS_AT_TOP
uv.y = 1 - uv.y;
#endif
if (_ProjectionParams.x < 0)
uv.y = 1 - uv.y;

#if UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION
float ratio = _ScreenParams.x / _ScreenParams.y;
Expand Down

0 comments on commit 6e2ad42

Please sign in to comment.