Browse Source

Shaders: don't compare ints and floats.

Fails on GLSL ES.
pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
69ee2f3ebb
  1. 2
      src/Shaders/PhongShader.frag

2
src/Shaders/PhongShader.frag

@ -36,7 +36,7 @@ void main() {
color.rgb += diffuseColor*lightColor*intensity;
/* Add specular color, if needed */
if(intensity != 0) {
if(intensity > 0.001) {
highp vec3 reflection = reflect(-normalizedLightDirection, normalizedTransformedNormal);
mediump float specularity = pow(max(0.0, dot(normalize(cameraDirection), reflection)), shininess);
color.rgb += specularColor*specularity;

Loading…
Cancel
Save