UI Mask & Masking Layer Limit

Given the following scene where the Green, Blue and White labels have a masking component. When the White and Blue masking components are enabled, the text is masked as expected. When masking is enabled on the Green label (making it 3 layers), the text disappears. Is this by design and a limitation of the system or is this an issue?

We’re running into the same issue where we have a super complex UI with sub windows and such. The masking limit of 3 is throwing monkey wrenches for the sub panels.

Is there a way we specify the mask level limit ourselves (I’m sure there’s a limit for a reason). We could probably get away with ~5.

Sample of the panels we’re doing (not the most complex though - those aren’t masking right):

We’re having a hard time building any moderately complex panel with the mask limit. This panel is a Window (content mask), scrolling list (content mask), then the dropdown has a scrolling list (content mask) which is failing (showing white box):

Is this a “feature” or a “bug”? I can put in a bug report, but it’s definitely hardwired into the engine. This is unfortunately preventing us from fully converting our current tools from using scaleform to unity (and we REALLY want to break free from scaleform! haha). This is literally the last thing we need to have the tools converted.

I will say at points, we probably have 300+ UI elements going and there’s no noticeable slowdown.

Can we get a confirmation that 3 layers of masking is the maximum supported or if this is an issue that should be reported?

Bug reported (Case 654689). Includes sample project showing masked prefab stack:

The children of masks start failing at the 3rd mask level, so we only really have 2 valid levels of masking. Seems crazy shallow.

hey this is a BUG, it should support a larger number than 3 (8 I believe, but I’d have to check the code).

It fails past 3 right now.

Could you please explain how the Stencil ID is computed?

It should just be the depth under the mask. So if it’s 3 elements nested it should be 3, we use this as the write mask.

When going 3 deep, I have to set the Stencil ID to 11 right now. So maybe something is up.

1 Layer = Stencil ID 1
2 Layer = 3
3 Layer = 11

That is when I set the Stencil ID manually in the shader.

woot! glad you guys are on it (and that it is a bug)! can’t wait to de-flatten our panels! =D

Was there a number for this, just for tracking purposes?

^

Thanks again!

ahh blind :slight_smile:

Can’t seem to find Case 654689 - may have been killed as it looks like a duplicate of an earlier - Unity Issue Tracker - UI: Nested masks behave incorrectly

Tagging post w/ this one. Everyone else who’s waiting on this, if you could vote on it, maybe that would expedite a little.

Hey, I got this bug again at 5.1.2p2. Any solution?

Well, seems like its my custom shader’s problem. I will try to compare it with the sprites-default shader.