diff options
| author | Graham Linden <graham@lindenlab.com> | 2018-09-18 21:54:38 +0100 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2018-09-18 21:54:38 +0100 | 
| commit | c9b2759469cb090b76a7d602eb876659c305c7f3 (patch) | |
| tree | 83567181f2494a6c1614b24ae680a808637dea50 | |
| parent | 030afe0aaa0c956caa5509bca433c056eaf284fd (diff) | |
SL-1475
Make stars use higher alpha and brighten reflected color before mixing to get stars to show up in reflections on water.
| -rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/waterF.glsl | 1 | ||||
| -rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/pipeline.h | 1 | 
4 files changed, 13 insertions, 0 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index 98c5030a04..aeec247514 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -167,6 +167,7 @@ void main()  	//mix with reflection  	// Note we actually want to use just df1, but multiplying by 0.999999 gets around an nvidia compiler bug +    refcol.rgb = pow(refcol.rgb, vec3(0.45)); // boost the reflect color a little to get stars to show up SL-1475  	color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999);  	vec4 pos = vary_position; diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 76c0bd5abf..455df837a9 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -329,6 +329,11 @@ void LLDrawPoolWLSky::renderStarsDeferred(void) const      }      gDeferredStarProgram.uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); + +    if (LLPipeline::sRenderingWaterReflection) +    { +        star_alpha = 1.0f; +    }  	gDeferredStarProgram.uniform1f(sCustomAlpha, star_alpha);      sStarTime = (F32)LLFrameTimer::getElapsedSeconds() * 0.5f; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1522403990..c722c442f1 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -339,6 +339,7 @@ bool	LLPipeline::sRenderFrameTest = false;  bool	LLPipeline::sRenderAttachedLights = true;  bool	LLPipeline::sRenderAttachedParticles = true;  bool	LLPipeline::sRenderDeferred = false; +bool	LLPipeline::sRenderingWaterReflection = false;  bool    LLPipeline::sMemAllocationThrottled = false;  S32		LLPipeline::sVisibleLightCount = 0;  F32		LLPipeline::sMinRenderSize = 0.f; @@ -9838,6 +9839,8 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)  		if (!LLViewerCamera::getInstance()->cameraUnderWater())  		{	//generate planar reflection map +            LLPipeline::sRenderingWaterReflection = true; +  			//disable occlusion culling for reflection map for now  			S32 occlusion = LLPipeline::sUseOcclusion;  			LLPipeline::sUseOcclusion = 0; @@ -9972,6 +9975,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)  				gPipeline.popRenderTypeMask();  			}	 + +            LLPipeline::sRenderingWaterReflection = false; +  			glCullFace(GL_BACK);  			gGL.popMatrix();  			mWaterRef.flush(); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index d17bab775d..b292ac9358 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -582,6 +582,7 @@ public:  	static bool				sRenderAttachedLights;  	static bool				sRenderAttachedParticles;  	static bool				sRenderDeferred; +    static bool				sRenderingWaterReflection;  	static bool             sMemAllocationThrottled;  	static S32				sVisibleLightCount;  	static F32				sMinRenderSize; | 
