Skip to content

Commit

Permalink
fix: stencil masking does not working correctly when SoftMask compo…
Browse files Browse the repository at this point in the history
…nent is placed under `Mask` component

close #183
  • Loading branch information
mob-sakai committed Sep 4, 2024
1 parent e3a8c47 commit 07084aa
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Packages/src/Runtime/SoftMask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -593,13 +593,6 @@ public override Material GetModifiedMaterial(Material baseMaterial)
{
if (!isActiveAndEnabled || !graphic || !graphic.canvas) return baseMaterial;

if (SoftMaskingEnabled() && !UISoftMaskProjectSettings.useStencilOutsideScreen)
{
graphic.canvasRenderer.hasPopInstruction = false;
graphic.canvasRenderer.popMaterialCount = 0;
return showMaskGraphic ? baseMaterial : null;
}

return base.GetModifiedMaterial(baseMaterial);
}

Expand Down

0 comments on commit 07084aa

Please sign in to comment.