Commit graph

6 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
Stephen Birarda
f969e050cd add apache license to shader headers 2014-04-09 09:59:05 -07:00
Andrzej Kapolka
4deb9936ba Don't add the specular alpha in the model fragment shaders. 2014-01-27 17:44:13 -08:00
Andrzej Kapolka
06e050f1c1 Normal map support almost there. 2013-10-29 22:13:00 -07:00