diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-06-02 18:43:06 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-06-02 18:43:06 -0500 |
| commit | 78f966b5db9abc8467fd2f9dc002aa3a16f0f7a2 (patch) | |
| tree | c153341dcb16555fd7116990f5bfc6d0c937920d /indra/newview/lldrawpoolbump.cpp | |
| parent | 220afbcda0961df86ad08bbd51d96b8c868b2e62 (diff) | |
| parent | 69aef3a80627e0924de098bd558dd3eb8ed9ba37 (diff) | |
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
| -rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 3fe3896aa2..288ba8f536 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -311,6 +311,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV); if (shader_level > 1) { + cube_map->setMatrix(1); // Make sure that texture coord generation happens for tex unit 1, as that's the one we use for // the cube map in the one pass shiny shaders cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); @@ -319,6 +320,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di } else { + cube_map->setMatrix(0); cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); diffuse_channel = -1; cube_map->enable(cube_channel); @@ -332,6 +334,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di diffuse_channel = -1; gGL.getTexUnit(0)->disable(); cube_map->enable(0); + cube_map->setMatrix(0); gGL.getTexUnit(0)->bind(cube_map); } } @@ -390,6 +393,7 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& // Moved below shader->disableTexture call to avoid false alarms from auto-re-enable of textures on stage 0 // MAINT-755 cube_map->disable(); + cube_map->restoreMatrix(); } } @@ -460,6 +464,7 @@ void LLDrawPoolBump::beginFullbrightShiny() LLVector4 vec4(vec, gShinyOrigin.mV[3]); shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV); + cube_map->setMatrix(1); if (shader->mFeatures.hasReflectionProbes) { gPipeline.bindReflectionProbes(*shader); @@ -525,6 +530,7 @@ void LLDrawPoolBump::endFullbrightShiny() if( cube_map ) { cube_map->disable(); + cube_map->restoreMatrix(); if (shader->mFeatures.hasReflectionProbes) { gPipeline.unbindReflectionProbes(*shader); |
