Skip to content

Commit

Permalink
fix box shadow showing behind background of the object
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtGokhan committed Oct 6, 2024
1 parent b103518 commit 51c4f8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Runtime/Frameworks/UGUI/Shapes/WebShadow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void SetToMaterial(Material mat)
else
{
mat.SetInt("_StencilReadMask", StencilId);
mat.SetInt("_StencilComp", (int) CompareFunction.LessEqual);
mat.SetInt("_StencilComp", (int) CompareFunction.Greater);
}
}
}
Expand All @@ -69,7 +69,7 @@ public override Material materialForRendering
{
var depth = MaskUtilities.GetStencilDepth(MaskRoot, MaskRoot.GetComponentInParent<Canvas>()?.transform ?? MaskRoot.root);
var id = 0;
for (int i = 0; i < depth; i++) id |= 1 << i;
for (int i = 0; i <= depth; i++) id |= 1 << i;
stencilId = id;
}

Expand Down

0 comments on commit 51c4f8c

Please sign in to comment.