Depth value tweak.

This commit is contained in:
Andrzej Kapolka 2014-11-04 18:27:24 -08:00
parent 52d0b15979
commit a0e0c47701

View file

@ -256,6 +256,7 @@ void DeferredLightingEffect::render() {
float expandedRadius = light.radius * (1.0f + SCALE_EXPANSION);
if (glm::distance(eyePoint, glm::vec3(light.position)) < expandedRadius) {
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -1.0f);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
@ -304,6 +305,7 @@ void DeferredLightingEffect::render() {
float edgeRadius = expandedRadius / glm::cos(light.cutoff);
if (glm::distance(eyePoint, glm::vec3(light.position)) < edgeRadius) {
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -1.0f);
glMatrixMode(GL_PROJECTION);
glPushMatrix();