Commit graph

9 commits

Author SHA1 Message Date
Andrzej Kapolka
4f87524821 Switched back to using uniforms for light parameters, as using the fixed
function state killed my frame rate.  Also cleaned up some of the location
tracking.
2014-07-22 18:03:13 -07:00
Andrzej Kapolka
be028c2b01 Fixes for local lights. 2014-07-22 14:13:51 -07:00
TonyPeng
94e81da557 Added local lights to avatar. Added haze to voxel. 2014-07-08 09:44:28 -07:00
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