diff options
| author | Graham Linden <graham@lindenlab.com> | 2019-02-04 12:56:11 -0800 |
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2019-02-04 12:56:11 -0800 |
| commit | 9a007cceeffb1b960ba495cd0e3d592698a52a99 (patch) | |
| tree | 07cb157b13f93d3a390fd566852633c240f90a0c /indra/newview/pipeline.cpp | |
| parent | 1d1fcb451cc99b5ee2efbe1fdf38a0607233a2d8 (diff) | |
SL-10461
Pass projector ambiance as the .w element of the light_attenuation uniform
so that alpha shader can emulate the behavior of proper spot projectors.
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rw-r--r-- | indra/newview/pipeline.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0784f3acdd..86b9038e3f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6482,7 +6482,9 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) light_state->setSpotCutoff(90.f); light_state->setSpotExponent(2.f); - const LLColor4 specular(0.f, 0.f, 0.f, 0.f); + LLVector3 spotParams = light->getSpotLightParams(); + + const LLColor4 specular(0.f, 0.f, 0.f, spotParams[2]); light_state->setSpecular(specular); } else // omnidirectional (point) light @@ -6491,8 +6493,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) light_state->setSpotCutoff(180.f); // we use specular.w = 1.0 as a cheap hack for the shaders to know that this is omnidirectional rather than a spotlight - const LLColor4 specular(0.f, 0.f, 0.f, 1.f); - light_state->setSpecular(specular); + const LLColor4 specular(0.f, 0.f, 1.f, 0.f); + light_state->setSpecular(specular); } cur_light++; if (cur_light >= 8) |
