Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image doesn't mask when use Unity Mask and MaskingShape #209

Closed
giangchau92 opened this issue Nov 3, 2024 · 8 comments
Closed

Image doesn't mask when use Unity Mask and MaskingShape #209

giangchau92 opened this issue Nov 3, 2024 · 8 comments
Assignees
Labels
bug Something isn't working released

Comments

@giangchau92
Copy link

Hi,
Thank you for creating useful tool. I got this bug when use Soft Mask
My hierarchy like that.
image

When SoftMask-Black inside UnityMask-White, everything work properly.
But when I move SoftMask-Black to outsize of UnityMask-White, red image is visible outsize of UnityMask-White

image
SoftMaskBug.zip

To Reproduce
Steps to reproduce the behavior:

  1. Open SampleScene scene on attachment unity project
  2. Move SoftMask-Black around for testing
  3. See error when move SoftMask-Black outside of UnityMask-White

Environment:

  • Version: SoftMaskForUGUI 2.4.0
  • Platform: Mac
  • Unity version: 2022.3.14f1

I believe that MaskShape stencil was not setup correctly

@giangchau92 giangchau92 added the bug Something isn't working label Nov 3, 2024
@mob-sakai
Copy link
Owner

Thank you for your reporting!

@mob-sakai
Copy link
Owner

The stencil isn’t functioning properly.
This will likely require a significant overhaul of the MaskingShape system... 🤔

@mob-sakai
Copy link
Owner

mob-sakai commented Nov 14, 2024

@gusteixeira-25
Copy link

gusteixeira-25 commented Nov 14, 2024

Yes, that is exactly what I want.
I have tried to fixed this in my side. It like

image

And I have to clean stencil stack then

image But I am not sure if it would run as your designed

@mob-sakai
Copy link
Owner

Please try the release candidate package. 😃

"com.coffee.softmask-for-ugui": "https://github.com/mob-sakai/SoftMaskForUGUI.git?path=Packages/src#develop-preview"

@mob-sakai
Copy link
Owner

Additionally, a few tricks were necessary to prevent soft masking from breaking.

@giangchau92
Copy link
Author

Thank you, It works great

@mob-sakai mob-sakai reopened this Nov 15, 2024
mob-sakai added a commit that referenced this issue Nov 17, 2024
mob-sakai added a commit that referenced this issue Nov 17, 2024
mob-sakai added a commit that referenced this issue Nov 23, 2024
mob-sakai added a commit that referenced this issue Nov 23, 2024
github-actions bot pushed a commit that referenced this issue Dec 1, 2024
# [3.0.0](v2.4.6...3.0.0) (2024-12-01)

### Bug Fixes

* fix anti-aliasing issues ([e68ee7b](e68ee7b))

### Features

* add 'SOFTMASKABLE' shader feature to improve shader build ([eec3212](eec3212))
* asset upgrade system 'SOFTMASKABLE' shader feature ([d36f932](d36f932))
* MaskingShape components always use stencil mask ([6c6ac59](6c6ac59)), closes [#203](#203) [#209](#209)
* strip shaders using ShaderVariantCollection instead of 'Always Include Shaders' ([5f4c435](5f4c435)), closes [#211](#211)
* update asset upgrade system to unregister always included shaders ([906bdb6](906bdb6))

### BREAKING CHANGES

* SoftMaskable shaders now require the `SOFTMASKABLE` shader feature.
Please upgrade assets from `Project Settings > UI > Soft Mask` or refer to the 'README > Usage with Your Custom Shaders' section to manually update your shaders.
@mob-sakai
Copy link
Owner

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

3 participants