From 89d8f7f384dcd6c201288bf6fe86ab19e59e1a5c Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 11 Nov 2012 13:40:19 +0000 Subject: Corrected light attenuation values. --- src/render/draw.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/render') diff --git a/src/render/draw.cc b/src/render/draw.cc index 1d99077..12a64ad 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -111,9 +111,9 @@ void pass_prepare(float seconds) // add zone lights if (globe->has_flag(core::Entity::Bright)) { - float zone_light_brightness = (globe->color().r + globe->color().g + globe->color().b) / 3; + float zone_light_brightness = math::max(globe->color().r, math::max(globe->color().g, globe->color().b)); Light *zone_light = new Light(globe->location(), globe->color()); - zone_light->set_attenuation(zone_light_brightness * 1.5f, zone_light_brightness * 0.00001f, zone_light_brightness * 0.000000001f); + zone_light->set_attenuation(zone_light_brightness * 2.0f, 0.0f, 0.0f); lightenv_zone.add(zone_light); } -- cgit v1.2.3