Browse Source

Fix https://github.com/urho3d/Urho3D/issues/2889 [cache clear] (#2891)

1vanK 3 years ago
parent
commit
9687f31c4c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/CoreData/Shaders/HLSL/Lighting.hlsl

+ 1 - 1
bin/CoreData/Shaders/HLSL/Lighting.hlsl

@@ -179,7 +179,7 @@ float GetDiffuseVolumetric(float3 worldPos)
 float GetSpecular(float3 normal, float3 eyeVec, float3 lightDir, float specularPower)
 {
     float3 halfVec = normalize(normalize(eyeVec) + lightDir);
-    return saturate(pow(dot(normal, halfVec), specularPower));
+    return saturate(pow(max(dot(normal, halfVec), 0.0), specularPower));
 }
 
 float GetIntensity(float3 color)