Commit graph

10 commits

Author SHA1 Message Date
Andrzej Kapolka
646c0dc48f Working on translucent model bits. 2014-09-19 15:31:46 -07:00
Andrzej Kapolka
580d591dc4 Working on getting glow to work with deferred lighting. 2014-09-15 17:11:36 -07:00
Andrzej Kapolka
24b193b5dc Alpha testing bits. 2014-09-12 18:11:46 -07:00
Andrzej Kapolka
53933fc9c6 Working on deferred lighting for models. 2014-09-12 17:09:07 -07:00
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
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