diff options
author | Dave Parks <davep@lindenlab.com> | 2023-02-23 11:47:24 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-02-23 11:47:24 -0600 |
commit | e5e94b5fa832c62dc0df239fdb4aefc23e559c0c (patch) | |
tree | 39e35cdc270c6a970c541a2e1714a3216aaf6d84 /indra/newview/llviewershadermgr.cpp | |
parent | 93a82d4b7516f5970b7fc3d6415119c79d2ed7c5 (diff) |
DRTVWR-559 Fix for irradiance maps going black at 128x128 radiance map resolution. Improve radiance map anti-aliasing and default to 128x128 everywhere.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 5d3da55499..bddce2d6d9 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -73,6 +73,7 @@ LLGLSLShader gSkinnedOcclusionProgram; LLGLSLShader gOcclusionCubeProgram; LLGLSLShader gGlowCombineProgram; LLGLSLShader gReflectionMipProgram; +LLGLSLShader gGaussianProgram; LLGLSLShader gRadianceGenProgram; LLGLSLShader gIrradianceGenProgram; LLGLSLShader gGlowCombineFXAAProgram; @@ -3185,12 +3186,20 @@ BOOL LLViewerShaderMgr::loadShadersInterface() gReflectionMipProgram.mShaderFiles.push_back(make_pair("interface/reflectionmipF.glsl", GL_FRAGMENT_SHADER)); gReflectionMipProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; success = gReflectionMipProgram.createShader(NULL, NULL); - if (success) - { - gReflectionMipProgram.bind(); - gReflectionMipProgram.uniform1i(sScreenMap, 0); - gReflectionMipProgram.unbind(); - } + } + + if (success) + { + gGaussianProgram.mName = "Reflection Mip Shader"; + gGaussianProgram.mFeatures.isDeferred = true; + gGaussianProgram.mFeatures.hasGamma = true; + gGaussianProgram.mFeatures.hasAtmospherics = true; + gGaussianProgram.mFeatures.calculatesAtmospherics = true; + gGaussianProgram.mShaderFiles.clear(); + gGaussianProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectV.glsl", GL_VERTEX_SHADER)); + gGaussianProgram.mShaderFiles.push_back(make_pair("interface/gaussianF.glsl", GL_FRAGMENT_SHADER)); + gGaussianProgram.mShaderLevel = mShaderLevel[SHADER_INTERFACE]; + success = gGaussianProgram.createShader(NULL, NULL); } if (success && gGLManager.mHasCubeMapArray) |