Expected behavior
The mask should be in the proper position according to the canvas position. In our case, canvas is displaced because of the notch, so it doesn't have the fullscreen size.
Thank you for your reporting!
Could you please attach a minimal project (included Assets, Packages and ProjectSettings directories) that reproduces the issue?
Hello,
Description Masked elements are off-set if canvas is not full screen.
It is caused by line 39 in
SoftMask.cginc
half2 view = clipPos.xy/_ScreenParams.xy;
specifically
_ScreenParams.xy
. According to https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html, it returns camera render size in pixels, not canvas size. Proposed fix is to pass offsets to calculate true canvas size and position.Expected behavior The mask should be in the proper position according to the canvas position. In our case, canvas is displaced because of the notch, so it doesn't have the fullscreen size.
Environment