summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-28 21:48:22 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-28 21:48:22 -0800
commit1bf2a13835572e30e6fa7c73bf7c6d58b56f81a4 (patch)
treef9d927fa11a8618bfa08512b3c5fbcc82e867f43
parentae75d7b9dc3bac4a77068a3c7551ff70e8759a44 (diff)
getting closer to point/spot interchangability
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl6
-rw-r--r--indra/newview/pipeline.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
index fd264b9e74..e5bf76db55 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -20,9 +20,9 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
// Collect normal lights (need to be divided by two, as we later multiply by 2)
col.rgb += gl_LightSource[1].diffuse.rgb * calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
- col.rgb += gl_LightSource[2].diffuse.rgb * calcPointLight2(pos, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation);
- col.rgb += gl_LightSource[3].diffuse.rgb * calcPointLight2(pos, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation);
- //col.rgb += gl_LightSource[4].diffuse.rgb * calcPointLight2(pos, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation);
+ col.rgb += gl_LightSource[2].diffuse.rgb * calcPointLight2(pos, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].specular.a);
+ col.rgb += gl_LightSource[3].diffuse.rgb * calcPointLight2(pos, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].specular.a);
+ //col.rgb += gl_LightSource[4].diffuse.rgb * calcPointLight2(pos, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].specular.a);
col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2a1ed1b5ab..3dc175d723 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4584,8 +4584,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
glLightf (gllight, GL_SPOT_CUTOFF, 180.0f);
// we use specular.w = 1.0 as a cheap hack for the shaders to know that this is omnidirectional rather than a spotlight
- const float specular = {0.f, 0.f, 0.f, 1.f},
- glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV);
+ const float specular[] = {0.f, 0.f, 0.f, 1.f};
+ glLightfv(gllight, GL_SPECULAR, specular);
}
cur_light++;
if (cur_light >= 8)