diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2021-04-12 16:58:18 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2021-04-29 08:42:54 -0700 |
commit | 70527ee66ca869184aba14db73e3ab3f1bd5e1c3 (patch) | |
tree | d477b28578c109976430a3b44b2dab1949ebe6f0 /indra/newview/llviewershadermgr.cpp | |
parent | 029f179719907d674f89e39577c37e82e654b59d (diff) |
SL-14113 Fix moon haze
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index be5c22e7c3..8eb57799c9 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -78,7 +78,7 @@ LLGLSLShader gTransformTangentProgram; //utility shaders LLGLSLShader gOcclusionProgram; LLGLSLShader gOcclusionCubeProgram; -LLGLSLShader gCustomAlphaProgram; +LLGLSLShader gCustomAlphaProgram; // SL-14113 This used to be used for the stars with Atmospheric Shaders: OFF LLGLSLShader gGlowCombineProgram; LLGLSLShader gSplatTextureRectProgram; LLGLSLShader gGlowCombineFXAAProgram; @@ -148,6 +148,8 @@ LLGLSLShader gSkinnedObjectFullbrightShinyWaterProgram; LLGLSLShader gSkinnedObjectShinySimpleWaterProgram; //environment shaders +LLGLSLShader gMoonProgram; +LLGLSLShader gStarsProgram; LLGLSLShader gTerrainProgram; LLGLSLShader gTerrainWaterProgram; LLGLSLShader gWaterProgram; @@ -819,6 +821,9 @@ void LLViewerShaderMgr::unloadShaders() gWaterProgram.unload(); gWaterEdgeProgram.unload(); gUnderWaterProgram.unload(); + + gMoonProgram.unload(); + gStarsProgram.unload(); gTerrainProgram.unload(); gTerrainWaterProgram.unload(); gGlowProgram.unload(); @@ -1051,6 +1056,32 @@ BOOL LLViewerShaderMgr::loadShadersEnvironment() llassert(success); } + if (success) + { + gStarsProgram.mName = "Environment Stars Shader"; + gStarsProgram.mShaderFiles.clear(); + gStarsProgram.mShaderFiles.push_back(make_pair("environment/starsV.glsl", GL_VERTEX_SHADER_ARB)); + gStarsProgram.mShaderFiles.push_back(make_pair("environment/starsF.glsl", GL_FRAGMENT_SHADER_ARB)); + gStarsProgram.mShaderLevel = mShaderLevel[SHADER_ENVIRONMENT]; + success = gStarsProgram.createShader(NULL, NULL); + llassert(success); + } + + if (success) + { + gMoonProgram.mName = "Environment Moon Shader"; + gMoonProgram.mShaderFiles.clear(); + gMoonProgram.mShaderFiles.push_back(make_pair("environment/moonV.glsl", GL_VERTEX_SHADER_ARB)); + gMoonProgram.mShaderFiles.push_back(make_pair("environment/moonF.glsl", GL_FRAGMENT_SHADER_ARB)); + gMoonProgram.mShaderLevel = mShaderLevel[SHADER_ENVIRONMENT]; + success = gMoonProgram.createShader(NULL, NULL); + if (success) + { + gMoonProgram.bind(); + gMoonProgram.uniform1i(sTex0, 0); + } + } + if (!success) { mShaderLevel[SHADER_ENVIRONMENT] = 0; |