summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsky.cpp
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2021-04-12 16:58:18 -0700
committerPtolemy <ptolemy@lindenlab.com>2021-04-29 08:42:54 -0700
commit70527ee66ca869184aba14db73e3ab3f1bd5e1c3 (patch)
treed477b28578c109976430a3b44b2dab1949ebe6f0 /indra/newview/lldrawpoolsky.cpp
parent029f179719907d674f89e39577c37e82e654b59d (diff)
SL-14113 Fix moon haze
Diffstat (limited to 'indra/newview/lldrawpoolsky.cpp')
-rw-r--r--indra/newview/lldrawpoolsky.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index b6f55e800a..96b4a91b0f 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -130,13 +130,32 @@ void LLDrawPoolSky::renderSkyFace(U8 index)
face->renderIndexed();
}
+ else // Moon
+ if (index == LLVOSky::FACE_MOON)
+ {
+ LLGLSPipelineDepthTestSkyBox gls_skybox(true, true); // SL-14113 Write depth for moon so stars can test if behind it
+
+ LLGLEnable blend(GL_BLEND);
+
+ // if (LLGLSLShader::sNoFixedFunction) // TODO: Necessary? is this always true? We already bailed on gPipeline.canUseWindLightShaders ... above
+ LLViewerTexture* tex = face->getTexture(LLRender::DIFFUSE_MAP);
+ if (tex)
+ {
+ gMoonProgram.bind(); // SL-14113 was gOneTextureNoColorProgram
+ gGL.getTexUnit(0)->bind(tex, true);
+ face->renderIndexed();
+ }
+ }
else // heavenly body faces, no interp...
{
+ LLGLSPipelineDepthTestSkyBox gls_skybox(true, false); // reset to previous
+
LLGLEnable blend(GL_BLEND);
LLViewerTexture* tex = face->getTexture(LLRender::DIFFUSE_MAP);
if (tex)
{
+ gOneTextureNoColorProgram.bind();
gGL.getTexUnit(0)->bind(tex, true);
face->renderIndexed();
}