summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2021-04-12 16:58:18 -0700
committerPtolemy <ptolemy@lindenlab.com>2021-04-29 14:07:57 -0700
commitced2bd5ed4386d50231edfd1ebec01561f9b4465 (patch)
tree565d35d34343919387f2c0e281f8f2be64a0e2e6 /indra/newview/lldrawpoolwlsky.cpp
parent59ab227c4020565f85e6fc2edf3e3fcc16abb574 (diff)
SL-14113 Fix moon haze
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index c66aa905f5..436ecabd83 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -270,8 +270,8 @@ void LLDrawPoolWLSky::renderStars(const LLVector3& camPosLocal) const
gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f);
if (LLGLSLShader::sNoFixedFunction)
{
- gCustomAlphaProgram.bind();
- gCustomAlphaProgram.uniform1f(sCustomAlpha, star_alpha.mV[3]);
+ gStarsProgram.bind();
+ gStarsProgram.uniform1f(sCustomAlpha, star_alpha.mV[3]);
}
else
{
@@ -288,7 +288,7 @@ void LLDrawPoolWLSky::renderStars(const LLVector3& camPosLocal) const
if (LLGLSLShader::sNoFixedFunction)
{
- gCustomAlphaProgram.unbind();
+ gStarsProgram.unbind(); // SL-14113 was gCustomAlphaProgram
}
else
{
@@ -477,7 +477,8 @@ void LLDrawPoolWLSky::renderSkyClouds(const LLVector3& camPosLocal, F32 camHeigh
void LLDrawPoolWLSky::renderHeavenlyBodies()
{
- LLGLSPipelineBlendSkyBox gls_skybox(true, false);
+ //LLGLSPipelineBlendSkyBox gls_skybox(true, false);
+ LLGLSPipelineBlendSkyBox gls_skybox(true, true); // SL-14113 we need moon to write to depth to clip stars behind
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
gGL.pushMatrix();
@@ -607,8 +608,8 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
if (gPipeline.canUseWindLightShaders())
{
renderSkyHazeDeferred(origin, camHeightLocal);
- renderStarsDeferred(origin);
renderHeavenlyBodies();
+ renderStarsDeferred(origin);
renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader);
}
gGL.setColorMask(true, true);
@@ -626,8 +627,8 @@ void LLDrawPoolWLSky::render(S32 pass)
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
renderSkyHaze(origin, camHeightLocal);
+ renderHeavenlyBodies();
renderStars(origin);
- renderHeavenlyBodies();
renderSkyClouds(origin, camHeightLocal, cloud_shader);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);