Skip to content

[URP] + [Screen Space - Camera] mode has limitations with Orthographic Camera Size #236

Open
@jason-sylo

Description

@jason-sylo

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

  1. Install Unity 2022.3.16f1 + URP 14.0.9 and create a simple 2D project (Empty is OK)
  2. Open Package Manager and install UI Soft Mask 3.2.4
  3. Import UI Soft Mask Demo
  4. Run the UI Soft Mask Demo and toggle 'Camera' button in Canvas Renderer Mode (to apply Screen Space - Camera)

Issue A:

  1. 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
  2. SoftMasks are not rendered (all objects with SoftMask Component and Masking Mode = 'Soft Masking' are affected)

Issue B:

  1. In the currently running UI Soft Mask Demo + Screen Space - Camera applied state, set the Main Camera to Orthographic and change Size to 1
  2. Slowly drag the ScrollRect
  3. 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.

Screenshots
Image

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneed more infoNeed more information to help

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions