Skip to content

Commit f2211e1

Browse files
committedJun 13, 2020
NaN clamp
1 parent 45aeeae commit f2211e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎Assets/Chess/Shaders/Pieces.shader

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@
171171
float3 lightFinal = pow(UNITY_LIGHTMODEL_AMBIENT.xyz +
172172
diffuseReflection + i.ambient_SH * 0.7, 0.8);
173173

174-
col.rgb = min(((skyColor * (1.0 - _GrabPassAmount) +
174+
col.rgb = clamp(((skyColor * (1.0 - _GrabPassAmount) +
175175
_GrabPassAmount * grab.rgb) * col.rgb + col.rgb * (powRim) +
176-
(reflcol.rgb * reflcol.rgb * _CubeAmount) * rim) * lightFinal, 1.4);
176+
(reflcol.rgb * reflcol.rgb * _CubeAmount) * rim) * lightFinal, 0.0, 1.4);
177177

178178
return col;
179179
}

0 commit comments

Comments
 (0)