diff options
author | Dave Parks <davep@lindenlab.com> | 2022-05-16 17:21:08 +0000 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-05-16 17:21:08 +0000 |
commit | 3400e5fd302c0d9dea6386c4d5bf38876f2cc287 (patch) | |
tree | e791863ef5dabe1a6fb6cba59771607912362ab7 /indra/newview/llviewershadermgr.cpp | |
parent | 6c1fdac9df52ff920860066905a08db748ab0d95 (diff) |
SL-17284 Reflection probe tuning and optimization take 1
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 50a0ff07fc..94af320a73 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -82,6 +82,7 @@ LLGLSLShader gOcclusionCubeProgram; LLGLSLShader gCustomAlphaProgram; LLGLSLShader gGlowCombineProgram; LLGLSLShader gSplatTextureRectProgram; +LLGLSLShader gReflectionMipProgram; LLGLSLShader gGlowCombineFXAAProgram; LLGLSLShader gTwoTextureAddProgram; LLGLSLShader gTwoTextureCompareProgram; @@ -635,7 +636,6 @@ void LLViewerShaderMgr::setShaders() } if (loaded) - { loaded = loadTransformShaders(); if (loaded) @@ -746,6 +746,7 @@ void LLViewerShaderMgr::unloadShaders() gCustomAlphaProgram.unload(); gGlowCombineProgram.unload(); gSplatTextureRectProgram.unload(); + gReflectionMipProgram.unload(); gGlowCombineFXAAProgram.unload(); gTwoTextureAddProgram.unload(); gTwoTextureCompareProgram.unload(); @@ -3587,7 +3588,6 @@ BOOL LLViewerShaderMgr::loadShadersInterface() } } - if (success) { gTwoTextureAddProgram.mName = "Two Texture Add Shader"; @@ -3763,6 +3763,22 @@ BOOL LLViewerShaderMgr::loadShadersInterface() success = gAlphaMaskProgram.createShader(NULL, NULL); } + if (success) + { + gReflectionMipProgram.mName = "Reflection Mip Shader"; + gReflectionMipProgram.mShaderFiles.clear(); + gReflectionMipProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectV.glsl", GL_VERTEX_SHADER_ARB)); + gReflectionMipProgram.mShaderFiles.push_back(make_pair("interface/reflectionmipF.glsl", GL_FRAGMENT_SHADER_ARB)); + gReflectionMipProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; + success = gReflectionMipProgram.createShader(NULL, NULL); + if (success) + { + gReflectionMipProgram.bind(); + gReflectionMipProgram.uniform1i(sScreenMap, 0); + gReflectionMipProgram.unbind(); + } + } + if( !success ) { mShaderLevel[SHADER_INTERFACE] = 0; |