Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/render/draw.cc3
-rwxr-xr-xsrc/ui/modelview.cc2
2 files changed, 3 insertions, 2 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;
}
diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc
index 813fddb..d1c5c96 100755
--- a/src/ui/modelview.cc
+++ b/src/ui/modelview.cc
@@ -20,7 +20,7 @@ namespace ui
{
const float LIGHT_DISTANCE = -10.0f;
-const float LIGHT_ATTENUATION = 0.05f;
+const float LIGHT_ATTENUATION = 0.1f;
ModelView::ModelView(Widget *parent) : Widget(parent)
{