Skip to content

Commit

Permalink
feat: use the stencil buffer outside the scene view canvas for editing
Browse files Browse the repository at this point in the history
close #100
  • Loading branch information
mob-sakai committed Sep 8, 2020
1 parent dedd847 commit dbab85c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Packages/SoftMaskForUGUI/Shaders/SoftMask.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ float SoftMaskInternal(float4 clipPos)
#endif

fixed4 mask = tex2D(_SoftMaskTex, view);
half4 alpha = saturate(lerp(fixed4(1, 1, 1, 1), lerp(mask, 1 - mask, _MaskInteraction - 1), _MaskInteraction))
half4 alpha = saturate(lerp(fixed4(1, 1, 1, 1), lerp(mask, 1 - mask, _MaskInteraction - 1), _MaskInteraction));
#if SOFTMASK_EDITOR
* step(0, view.x) * step(view.x, 1) * step(0, view.y) * step(view.y, 1)
alpha = lerp(fixed4(1, 1, 1, 1), alpha, step(0, view.x) * step(view.x, 1) * step(0, view.y) * step(view.y, 1));
#endif
;

return alpha.x * alpha.y * alpha.z * alpha.w;
}
Expand Down

0 comments on commit dbab85c

Please sign in to comment.