Commit graph

4 commits

Author SHA1 Message Date
Andrzej Kapolka
bfd00f1b15 Use local viewer model for specular. 2014-05-23 10:57:14 -07:00
Andrzej Kapolka
4f4b4c08bb Restore specular lighting--but, per the OpenGL spec, shut off specular
contribution if the surface isn't facing the light.
2014-05-19 12:29:49 -07:00
Kai Ludwig
51965fd283 changed
float specular = max(0.0, dot(normalize(gl_LightSource[0].position + vec4(0.0, 0.0, 1.0, 0.0)), normalizedNormal));
to
    float specular = max(0.0, dot(gl_LightSource[0].position, normalizedNormal));

Calculation for specular value has to be done like in all other shaders with the unmodified unnormalized lightsource position. Otherwise the specular effect will have weird behaviour.
2014-05-16 15:44:07 +02:00
Andrzej Kapolka
d0537e7ead Specular map support. 2014-05-06 17:32:10 -07:00