Skip to content

Commit 0f07847

Browse files
committed
Fixed: task_495. Outline should be hidden when Clipping_matte is active.
1 parent a0d70d9 commit 0f07847

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToonOutline.hlsl

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
uniform float4 _OutlineMaskColor;
3535
uniform float _ComposerMaskMode;
3636
uniform int _ClippingMaskMode;
37-
37+
uniform int _ClippingMatteMode;
3838

3939
//v.2.0.4
4040
#ifdef _IS_OUTLINE_CLIPPING_YES
@@ -106,11 +106,18 @@
106106
}
107107
float4 frag(VertexOutput i) : SV_Target{
108108
#ifdef _IS_CLIPPING_MASK
109-
if (_ClippingMaskMode != 0)
110-
{
111-
discard;
112-
}
109+
if (_ClippingMaskMode != 0)
110+
{
111+
discard;
112+
}
113113
#endif
114+
#ifdef _IS_CLIPPING_MATTE
115+
if (_ClippingMatteMode != 0)
116+
{
117+
118+
discard;
119+
}
120+
#endif // _IS_CLIPPING_MATTE
114121
//v.2.0.5
115122
if (_ZOverDrawMode > 0.99f)
116123
{

0 commit comments

Comments
 (0)