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

Option to disable softening completely #98

Closed BenWoodford closed 3 years ago

BenWoodford commented 4 years ago

Is your feature request related to a problem? Please describe. The below happens when using a hard-edged mask (Unity's own mask doesn't support overlapping masks where it only masks the children, so having two images "splitscreen" style diagonally isn't terribly easy)

image

The masks for context

image

Even at 0.01 softness it gives a soft-edged look.

Describe the solution you'd like The option to completely disable softening and just utilise the other features of the component (like the better hierarchical masking)

mob-sakai commented 4 years ago

@BenWoodford Try increasing the texture resolution of the SpellMask-***.

BenWoodford commented 4 years ago

They were 1024x1024 so already pretty big. However more curiously, as had switched back to using Mask and only masking one half of the square (and toggling it as necessary)... when I switched back to the soft mask it suddenly isn't working and the buffer shows nothing in it. That's weird...

image

mob-sakai commented 4 years ago

I would like to know more about this issue.
 Could you please attach a minimal project (included Assets and ProjectSettings directory) that reproduces the issue?

mob-sakai commented 4 years ago

If you want a hard edge, Unity Default Masks are the easiest option:

NOTE: Set the Filter Mode to Pointer (no filter) in the import settings of mask textures.

issue98.unitypackage.zip

BenWoodford commented 4 years ago

I’ll see what I can do but as it occurred randomly I’m not sure how easy it’ll be to recreate it in a stand-alone project. Using Unity masks isn’t really viable in all scenarios as Unity doesn’t obey hierarchies for masks - two siblings will act as one mask I’ve found. Whereas your system does obey the hierarchy and only mask children

mob-sakai commented 3 years ago

Sorry for late reply. It seems desirable to support Softness=0.

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: