From 5e4c0cd857de2ede02dfc0f72feb75648d823600 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 25 Apr 2011 20:22:54 -0500 Subject: SH-1427 Fix for alpha objects not getting the right light curves when deferred rendering enabled. --- indra/newview/pipeline.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/newview/pipeline.cpp') 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 { -- cgit v1.3