diff options
author | Dave Houlton <euclid@lindenlab.com> | 2020-08-04 17:14:19 -0600 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2020-08-04 17:14:19 -0600 |
commit | 107a7fec34df0160c959de81d0d682ec671b5958 (patch) | |
tree | 3d8fd5da549c9e5f3dcbb49a39896b248eae9d17 /indra/newview/pipeline.cpp | |
parent | df85976a1fbc34dbcda286f29a36e39a6f16fdd5 (diff) |
SL-13521 add an avatar appearance light to deferred mode
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index df5765c99b..fc382c3bcc 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6435,13 +6435,6 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) F32 x = 3.f; float linatten = x / (light_radius); // % of brightness at radius - if (LLPipeline::sRenderDeferred) - { - /*light_color.mV[0] = powf(light_color.mV[0], 2.2f); - light_color.mV[1] = powf(light_color.mV[1], 2.2f); - light_color.mV[2] = powf(light_color.mV[2], 2.2f);*/ - } - mHWLightColors[2] = light_color; LLLightState* light = gGL.getLight(2); @@ -8813,6 +8806,19 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) light_colors.push_back(LLVector4(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff(DEFERRED_LIGHT_FALLOFF))); } } + + // If we're in avatar editing mode (3), add an avatar appearance light at the camera position + if (gAgentAvatarp && gAgentAvatarp->mSpecialRenderMode == 3) + { + // Cam coords (post-transform) are 0,0,0, with radius 15m + fullscreen_lights.push_back(LLVector4(0.f, 0.f, 0.f, 15.0f)); + + // Use a white light + LLVector4 white_light(LLColor4::white.mV); + white_light.mV[3] = 0.0f; + light_colors.push_back(white_light); + } + unbindDeferredShader(gDeferredLightProgram); } |