diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-22 13:25:50 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-22 13:25:50 -0500 |
commit | d0d1b832d4983f35ab29947eb6fda54a8aa48f8a (patch) | |
tree | a07f61179a59d315d842dc08aa9d7fd52dc35e79 /indra/newview/pipeline.cpp | |
parent | 4273b262072553aaa1a805ff08008de95da47aac (diff) |
SL-17600 Proper irradiance probes.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 028a0db95c..06c9d3c136 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9205,10 +9205,22 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader) void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) { S32 channel = shader.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); + bool bound = false; if (channel > -1 && mReflectionMapManager.mTexture.notNull()) { - // see comments in class2/deferred/softenLightF.glsl for what these uniforms mean mReflectionMapManager.mTexture->bind(channel); + bound = true; + } + + channel = shader.enableTexture(LLShaderMgr::IRRADIANCE_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); + if (channel > -1 && mReflectionMapManager.mIrradianceMaps.notNull()) + { + mReflectionMapManager.mIrradianceMaps->bind(channel); + bound = true; + } + + if (bound) + { mReflectionMapManager.setUniforms(); F32* m = gGLModelView; |