From d45ea5e5e60c09c1856a90928dca557262a335e9 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 31 Jul 2008 12:59:50 +0000 Subject: correction sunlight position relative to camera --- src/render/draw.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/render/draw.cc') diff --git a/src/render/draw.cc b/src/render/draw.cc index c575f20..8d8ea1f 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -472,7 +472,7 @@ void pass_prepare(float seconds) GLfloat specular_light[] = { 0.2f, 0.2f, 0.2f, 1.0f }; for (size_t i=0; i <3; i++) { - light_position[i] = globe->location()[i]; + light_position[i] = globe->location()[i] - render::Camera::eye()[i]; diffuse_light[i] = globe->color()[i] * 0.4; } light_position[3] = 1.0f; -- cgit v1.2.3