We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b103518 commit 51c4f8cCopy full SHA for 51c4f8c
Runtime/Frameworks/UGUI/Shapes/WebShadow.cs
@@ -48,7 +48,7 @@ public void SetToMaterial(Material mat)
48
else
49
{
50
mat.SetInt("_StencilReadMask", StencilId);
51
- mat.SetInt("_StencilComp", (int) CompareFunction.LessEqual);
+ mat.SetInt("_StencilComp", (int) CompareFunction.Greater);
52
}
53
54
@@ -69,7 +69,7 @@ public override Material materialForRendering
69
70
var depth = MaskUtilities.GetStencilDepth(MaskRoot, MaskRoot.GetComponentInParent<Canvas>()?.transform ?? MaskRoot.root);
71
var id = 0;
72
- for (int i = 0; i < depth; i++) id |= 1 << i;
+ for (int i = 0; i <= depth; i++) id |= 1 << i;
73
stencilId = id;
74
75
0 commit comments