Skip to content

Commit d4608b7

Browse files
authored
ChromaKeyUnlit - Add lighting after threshold test
1 parent be2a2cb commit d4608b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Packages/webxr-interactions/Runtime/Shaders/ChromaKeyUnlit.shader

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@ Shader "WebXR Mixed Reality Capture/Chroma Key Unlit" {
5858
fixed4 frag (v2f i) : SV_Target
5959
{
6060
fixed4 ligthing = tex2D(_LightingTex, i.texcoord2);
61-
fixed4 color = tex2D(_MainTex, i.texcoord) * ligthing * _Color;
61+
fixed4 color = tex2D(_MainTex, i.texcoord) * _Color;
6262
if (_ThresholdMin.r <= color.r && color.r <= _ThresholdMax.r
6363
&&_ThresholdMin.g <= color.g && color.g <= _ThresholdMax.g
6464
&&_ThresholdMin.b <= color.b && color.b <= _ThresholdMax.b)
6565
{
6666
color.a = 0;
6767
}
68+
color = color * ligthing;
6869
UNITY_APPLY_FOG(i.fogCoord, color);
6970
return color;
7071
}

0 commit comments

Comments
 (0)