Description
Describe the bug
In [URP] + [Screen Space - Camera] mode, problems occur when Orthographic Camera Size is 20 or more, or very small like 1.
To Reproduce
Steps to reproduce the behavior:
Common setup
- Install Unity 2022.3.16f1 + URP 14.0.9 and create a simple 2D project (Empty is OK)
- Open Package Manager and install UI Soft Mask 3.2.4
- Import UI Soft Mask Demo
- Run the UI Soft Mask Demo and toggle 'Camera' button in Canvas Renderer Mode (to apply Screen Space - Camera)
Issue A:
- In the currently running UI Soft Mask Demo + Screen Space - Camera applied state, set the Main Camera to
Orthographic in the Inspector and change Size to 20 or more - SoftMasks are not rendered (all objects with SoftMask Component and Masking Mode = 'Soft Masking' are affected)
Issue B:
- In the currently running UI Soft Mask Demo + Screen Space - Camera applied state, set the Main Camera to Orthographic and change Size to 1
- Slowly drag the ScrollRect
- Heavy aliasing occurs when SoftMask positions change (all objects with SoftMask Component and Masking Mode = 'Soft Masking' are affected)
Expected behavior
SoftMask should work correctly in Screen Space - Camera mode.
If limited by Orthographic Camera Size, the limitation should be notified or made configurable.
Environment (please complete the following information):
- Version 3.2.4
- Platform: Editor(Windows)
- Unity version: 2022.3.16f1
- Build options: Universal RP 14.0.9, UI Soft Mask Demo
Additional context
The aliasing in Issue B gets smaller when Orthographic Camera Size is close to 19.9.
I found these issues after upgrading from SoftMask 1.0.2 to 3.2.4.
Currently I set Orthographic Camera Size to 19 as a workaround.
There were no such problems in 1.0.2 even with a large Orthographic Camera Size.