diff options
Diffstat (limited to 'src/render/draw.cc')
-rw-r--r-- | src/render/draw.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index efdbd84..8f9f978 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -113,6 +113,7 @@ int add_light(const math::Vector3f & location, float attenuation, const math::Co // set up the light // we use a simple averaging of the color times the specified attenuation value(such as 0.00025f). // FIXME: use a more standardized and realistic way of doing this. + glLightf(gllight, GL_CONSTANT_ATTENUATION, ((color[0] + color[1] + color[2]) / 3.0f) * attenuation); glLightf(gllight, GL_LINEAR_ATTENUATION, ((color[0] + color[1] + color[2]) / 3.0f) * attenuation); glLightfv(gllight, GL_POSITION, gllight_location); @@ -174,7 +175,7 @@ void pass_prepare(float seconds) zone_light_location[i] = globe->location()[i]; zone_light_color[i] = globe->color()[i]; } - GLenum zone_gllight = add_light(zone_light_location, 0.00025f, globe->color()); + GLenum zone_gllight = add_light(zone_light_location, 0.0005f, globe->color()); gl::enable(zone_gllight); has_zone_light = true; } |