diff options
author | Dave Parks <davep@lindenlab.com> | 2022-10-12 14:46:51 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-10-12 14:46:51 -0500 |
commit | 42ec639c860e172803753b9cb41ae9483305f2f8 (patch) | |
tree | 43c538fda2152eef815f4a55dcdd479ca8f83bb4 /indra/newview/llviewershadermgr.cpp | |
parent | b6e576c7c2a1cb395092cc66b1836157872b131f (diff) |
SL-18190 Remove water reflection detail combo box and reimplement "Transparent Water" checkbox.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index e7dbdf2bea..718ed9e666 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -463,7 +463,6 @@ void LLViewerShaderMgr::setShaders() initAttribsAndUniforms(); gPipeline.releaseGLBuffers(); - LLPipeline::sWaterReflections = LLPipeline::sRenderTransparentWater; LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow"); LLPipeline::updateRenderDeferred(); @@ -1029,6 +1028,11 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterProgram.mShaderFiles.clear(); gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER)); gWaterProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER)); + gWaterProgram.clearPermutations(); + if (LLPipeline::sRenderTransparentWater) + { + gWaterProgram.addPermutation("TRANSPARENT_WATER", "1"); + } gWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; gWaterProgram.mShaderLevel = mShaderLevel[SHADER_WATER]; success = gWaterProgram.createShader(NULL, NULL); @@ -1050,6 +1054,11 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterV.glsl", GL_VERTEX_SHADER)); gWaterEdgeProgram.mShaderFiles.push_back(make_pair("environment/waterF.glsl", GL_FRAGMENT_SHADER)); gWaterEdgeProgram.addPermutation("WATER_EDGE", "1"); + gWaterEdgeProgram.clearPermutations(); + if (LLPipeline::sRenderTransparentWater) + { + gWaterEdgeProgram.addPermutation("TRANSPARENT_WATER", "1"); + } gWaterEdgeProgram.mShaderGroup = LLGLSLShader::SG_WATER; gWaterEdgeProgram.mShaderLevel = mShaderLevel[SHADER_WATER]; success = gWaterEdgeProgram.createShader(NULL, NULL); @@ -1067,6 +1076,11 @@ BOOL LLViewerShaderMgr::loadShadersWater() gUnderWaterProgram.mShaderFiles.push_back(make_pair("environment/underWaterF.glsl", GL_FRAGMENT_SHADER)); gUnderWaterProgram.mShaderLevel = mShaderLevel[SHADER_WATER]; gUnderWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER; + gUnderWaterProgram.clearPermutations(); + if (LLPipeline::sRenderTransparentWater) + { + gUnderWaterProgram.addPermutation("TRANSPARENT_WATER", "1"); + } success = gUnderWaterProgram.createShader(NULL, NULL); llassert(success); } |