diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-04-25 20:22:54 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-04-25 20:22:54 -0500 |
| commit | 5e4c0cd857de2ede02dfc0f72feb75648d823600 (patch) | |
| tree | 445404860feceec8bc41eb6939ae6436aff095e7 /indra/newview/pipeline.cpp | |
| parent | d8309a29efb7e3ce66d2ee5778418f3f9c1dd6ac (diff) | |
SH-1427 Fix for alpha objects not getting the right light curves when deferred rendering enabled.
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rw-r--r-- | indra/newview/pipeline.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bd3b5d05f6..21fbe52ccd 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -5019,9 +5019,17 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) light_state->setDiffuse(light_color); light_state->setAmbient(LLColor4::black); light_state->setConstantAttenuation(0.f); - light_state->setLinearAttenuation(linatten); - light_state->setQuadraticAttenuation(0.f); - + if (sRenderDeferred) + { + light_state->setLinearAttenuation(light_radius*1.5f); + light_state->setQuadraticAttenuation(light->getLightFalloff()*0.5f+1.f); + } + else + { + light_state->setLinearAttenuation(linatten); + light_state->setQuadraticAttenuation(0.f); + } + if (light->isLightSpotlight() // directional (spot-)light && (LLPipeline::sRenderDeferred || gSavedSettings.getBOOL("RenderSpotLightsInNondeferred"))) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on { |
