mob-sakai / SoftMaskForUGUI

Enhance Unity UI (uGUI) with advanced soft-masking features to create more visually appealing effects!
https://github.com/mob-sakai/SoftMaskForUGUI
MIT License
1.97k stars 261 forks source link

Scrollview softmasked items are visible outside viewport mask #82

Closed maskedmouse closed 3 years ago

maskedmouse commented 4 years ago

Describe the bug I've added a scrollview to my canvas with a softmasked item as child of content. However, the scrollview's viewport mask does does not occlude the softmasked items under content. Am I doing something wrong or is it broken in 2019.3.x?

The eventual use case is a ScrollView in a scrollview with content that is softmasked. Complicated layered UI. But a use case for my work.

To Reproduce Steps to reproduce the behavior:

  1. Go to Sample Scene
  2. Go into play mode
  3. scroll the list so that the item is half out of the viewport
  4. observe scroll view items not being occluded (hidden) outside of the viewport

Expected behavior Softmaskable items in a scrollview list outside of the viewport should be occluded

Screenshots Scrollview Softmask bug

Environment (please complete the following information):

Additional context Project for reproduction https://maskedmous.stackstorage.com/s/JYug7GMtoGk2THZ

mob-sakai commented 4 years ago

@maskedmouse Thank you for reporting!

mob-sakai commented 4 years ago

Scroll View With Regular Mask Viewport

It was due to SoftMask ignoring the stencil.

Scroll View With Soft Mask Viewport

UIMask sprite has a small alpha.

mob-sakai commented 4 years ago

Action plans:

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 1.0.0-preview.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket: