Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render/draw.cc8
-rw-r--r--src/render/render.cc13
-rw-r--r--src/render/render.h6
-rwxr-xr-xsrc/ui/modelview.cc6
4 files changed, 7 insertions, 26 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc
index f60ba1a..e40e3cc 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -90,7 +90,7 @@ void pass_prepare(float seconds)
// zone ambient light
GLfloat zone_ambient[4];
for (size_t i = 0; i < 3; i++) {
- zone_ambient[i] = core::localplayer()->zone()->ambient_color()[i] * r_ambient->value();
+ zone_ambient[i] = core::localplayer()->zone()->ambient_color()[i];
}
zone_ambient[3] = 1.0f;
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, zone_ambient);
@@ -123,9 +123,9 @@ void pass_prepare(float seconds)
for (size_t i = 0; i < 3; i++) {
zone_light[i] = globe->location()[i];
zone_color[i] = globe->color()[i];
- ambient_light[i] = globe->color()[i] * (r_ambient->value() * 0.1);
- diffuse_light[i] = globe->color()[i] * (r_diffuse->value() * 0.8);
- specular_light[i] = globe->color()[i] * (r_specular->value() * 0.4);
+ ambient_light[i] = globe->color()[i] * 0.1;
+ diffuse_light[i] = globe->color()[i] * 0.8;
+ specular_light[i] = globe->color()[i] * 0.4;
}
zone_light[3] = 1.0f;
ambient_light[3] = 1.0f;
diff --git a/src/render/render.cc b/src/render/render.cc
index dae1cf5..45d3fda 100644
--- a/src/render/render.cc
+++ b/src/render/render.cc
@@ -41,10 +41,6 @@ core::Cvar *r_physics = 0;
core::Cvar *r_normals = 0;
core::Cvar *r_normalize = 0;
-core::Cvar *r_ambient = 0;
-core::Cvar *r_diffuse = 0;
-core::Cvar *r_specular = 0;
-
void func_list_textures(std::string const &args)
{
Textures::list();
@@ -102,15 +98,6 @@ void init(int width, int height)
r_lights = core::Cvar::get("r_lights", "1", core::Cvar::Archive);
r_lights->set_info("[bool] render lights");
- r_ambient = core::Cvar::get("r_ambient", "1.0", core::Cvar::Archive);
- r_ambient->set_info("[float] ambient light intensity");
-
- r_diffuse = core::Cvar::get("r_diffuse", "1.0", core::Cvar::Archive);
- r_diffuse->set_info("[float] diffuse light intensity");
-
- r_specular = core::Cvar::get("r_specular", "1.0", core::Cvar::Archive);
- r_specular->set_info("[float] specular light intensity");
-
r_physics = core::Cvar::get("r_physics", "0", core::Cvar::Archive);
r_physics->set_info("[bool] render physics (local game only)");
diff --git a/src/render/render.h b/src/render/render.h
index 53a40dc..2162457 100644
--- a/src/render/render.h
+++ b/src/render/render.h
@@ -67,12 +67,6 @@ extern core::Cvar *r_physics;
extern core::Cvar *r_mipmap;
/// use GL_NORMALIZE instead of GL_RESCALE_NORMAL
extern core::Cvar *r_normalize;
-/// ambient light intensity
-extern core::Cvar *r_ambient;
-/// diffuse light intensity
-extern core::Cvar *r_diffuse;
-/// specular light intensity
-extern core::Cvar *r_specular;
inline RenderExt *ext_render(const core::Entity *entity)
{
diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc
index 6d10c28..ec840c1 100755
--- a/src/ui/modelview.cc
+++ b/src/ui/modelview.cc
@@ -189,12 +189,12 @@ void ModelView::draw()
// we set up the light in camera space
GLfloat modelview_light[] = { -10.0f * model->radius(), 0, 0, 1.0f };
- GLfloat ambient_light[] = { 0.25f, 0.25f, 0.25f, 1.0f };
+ GLfloat ambient_light[] = { 0.1f, 0.1f, 0.1f, 1.0f };
GLfloat diffuse_light[4];
GLfloat specular_light[4];
for (size_t i = 0; i < 3; i++) {
- diffuse_light[i] = render::r_diffuse->value() * 0.8f;
- specular_light[i] = render::r_specular->value() * 0.4f;
+ diffuse_light[i] = 0.8f;
+ specular_light[i] = 0.4f;
}
diffuse_light[3] = 1.0f;
specular_light[3] = 1.0f;