summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-06-18 13:14:27 -0700
committerGraham Linden <graham@lindenlab.com>2019-06-18 13:14:27 -0700
commit4abb342e9564a7740475c3abe60cd62ae5bbc34d (patch)
tree4136f395983ce0b6883e5dc86b9b42615b40b52d /indra/newview/pipeline.cpp
parente7ac7d766d1c817ad43d5bf0b5bba7f07495395b (diff)
SL-10969
Remove ambiance handling from alpha and blended materials objects for now. Still too many setups where they get blown out due to attenuation mismatches with deferred.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d13b0634cf..d1a6fd12f2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6346,11 +6346,11 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
continue;
}
- F32 x = (3.f * (1.f + light->getLightFalloff())); // why this magic? probably trying to match a historic behavior.
+ F32 x = (3.f * (1.f + (light->getLightFalloff() * 2.0f))); // why this magic? probably trying to match a historic behavior.
F32 linatten = x / (light_radius); // % of brightness at radius
// get falloff to match for forward deferred rendering lights
- F32 falloff = light->getLightFalloff() * 0.5f + (sRenderDeferred ? 0.0 : 1.f);
+ F32 falloff = light->getLightFalloff() + (sRenderDeferred ? 0.0 : 1.f);
mHWLightColors[cur_light] = light_color;
LLLightState* light_state = gGL.getLight(cur_light);
@@ -8784,7 +8784,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s);
gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
- gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
+ gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff());
gGL.syncMatrices();
mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, center));
@@ -8804,7 +8804,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
mat.mult_matrix_vec(tc);
fullscreen_lights.push_back(LLVector4(tc.v[0], tc.v[1], tc.v[2], s));
- light_colors.push_back(LLVector4(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f));
+ light_colors.push_back(LLVector4(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()));
}
}
unbindDeferredShader(gDeferredLightProgram);
@@ -8840,7 +8840,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s);
gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
- gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
+ gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff());
gGL.syncMatrices();
mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, center));
@@ -8915,7 +8915,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
LLVector3 center = drawablep->getPositionAgent();
F32* c = center.mV;
F32 light_size_final = volume->getLightRadius()*1.5f;
- F32 light_falloff_final = volume->getLightFalloff()*0.5f;
+ F32 light_falloff_final = volume->getLightFalloff();
sVisibleLightCount++;