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 | |
| parent | df85976a1fbc34dbcda286f29a36e39a6f16fdd5 (diff) | |
SL-13521 add an avatar appearance light to deferred mode
| -rw-r--r-- | indra/llrender/llrender.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 20 | 
2 files changed, 14 insertions, 8 deletions
| diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index cabf0528f0..e0d1ee4f4c 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1216,7 +1216,7 @@ void LLRender::syncLightState()          LLVector3 diffuse_b[8];          bool      sun_primary[8]; -		for (U32 i = 0; i < 8; i++) +		for (U32 i = 0; i < LL_NUM_LIGHT_UNITS; i++)  		{  			LLLightState* light = mLightState[i]; 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);  			} | 
