diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2021-04-12 16:58:18 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2021-04-12 16:58:18 -0700 |
commit | 01e5caade3d85eb618c1d7f16eb2e3972d1f65f9 (patch) | |
tree | 8f11ac8eb7c3a8101b80a4b219b2e5dec96f894c /indra/newview/llviewershadermgr.cpp | |
parent | caabb384bdb5d0d78023d1d9fd155838f022c186 (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; |