diff options
author | Dave Parks <davep@lindenlab.com> | 2013-07-01 10:53:09 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-07-01 10:53:09 -0500 |
commit | 1c9a4fc080bee955b5b18750fe8de7c24a3f912f (patch) | |
tree | 8cc8d098bbb61765920f3d7b9da7382ee16e9f30 /indra/newview/pipeline.cpp | |
parent | 7df863265f6f536aeae84dceab9140fb4465213c (diff) |
NORSPEC-290 Shader optimization WIP -- remove some more divides and normalizes from various lighting functions, rework flow control based on profile feedback.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rwxr-xr-x | indra/newview/pipeline.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7072c95c3e..7fa0a972ad 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8680,7 +8680,7 @@ void LLPipeline::renderDeferredLighting() LLFastTimer ftm(FTM_LOCAL_LIGHTS); gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c); - gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); + gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, 1.f/s); gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV); gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f); gGL.syncMatrices(); @@ -8701,7 +8701,7 @@ void LLPipeline::renderDeferredLighting() glh::vec3f tc(c); mat.mult_matrix_vec(tc); - fullscreen_lights.push_back(LLVector4(tc.v[0], tc.v[1], tc.v[2], s)); + fullscreen_lights.push_back(LLVector4(tc.v[0], tc.v[1], tc.v[2], 1.f/s)); light_colors.push_back(LLVector4(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f)); } } @@ -8786,7 +8786,7 @@ void LLPipeline::renderDeferredLighting() col[count].mV[1] = powf(col[count].mV[1], 2.2f); col[count].mV[2] = powf(col[count].mV[2], 2.2f);*/ - far_z = llmin(light[count].mV[2]-light[count].mV[3], far_z); + far_z = llmin(light[count].mV[2]-1.f/light[count].mV[3], far_z); //col[count] = pow4fsrgb(col[count], 2.2f); count++; if (count == max_count || fullscreen_lights.empty()) |