aboutsummaryrefslogtreecommitdiff
path: root/engine/src/core-data/Common/MatDefs/Light/Lighting.frag
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/core-data/Common/MatDefs/Light/Lighting.frag')
-rw-r--r--engine/src/core-data/Common/MatDefs/Light/Lighting.frag4
1 files changed, 4 insertions, 0 deletions
diff --git a/engine/src/core-data/Common/MatDefs/Light/Lighting.frag b/engine/src/core-data/Common/MatDefs/Light/Lighting.frag
index 76f0e15..eb1c3fd 100644
--- a/engine/src/core-data/Common/MatDefs/Light/Lighting.frag
+++ b/engine/src/core-data/Common/MatDefs/Light/Lighting.frag
@@ -126,6 +126,10 @@ vec2 computeLighting(in vec3 wvNorm, in vec3 wvViewDir, in vec3 wvLightDir){
float att = vLightDir.w;
#endif
+ if (m_Shininess <= 1.0) {
+ specularFactor = 0.0; // should be one instruction on most cards ..
+ }
+
specularFactor *= diffuseFactor;
return vec2(diffuseFactor, specularFactor) * vec2(att);