From 846700d05808157e43b7ae56b57a031d4b9c7a0d Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 30 Nov 2012 21:19:34 +0000 Subject: Corrected a lighting bug while drawing fakespheres behind farplane. --- src/render/lightenvironment.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/render/lightenvironment.cc b/src/render/lightenvironment.cc index 1c61762..cacb80a 100644 --- a/src/render/lightenvironment.cc +++ b/src/render/lightenvironment.cc @@ -74,7 +74,7 @@ void LightEnvironment::draw(const math::Vector3f translate) Light *light = (*it); for (size_t i = 0; i < 3; i++) { - gl_light_location[i] = light->location()[i]; + gl_light_location[i] = light->location()[i] + translate[i]; gl_ambient_light[i] = light->color()[i] * env_ambient_intensity; gl_diffuse_light[i] = light->color()[i] * env_diffuse_intensity; gl_specular_light[i] = light->color()[i] * env_specular_intensity; -- cgit v1.2.3