diff options
author | Dave Parks <davep@lindenlab.com> | 2022-11-22 16:47:15 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-11-22 16:47:15 -0600 |
commit | dfa76a56e32b8577131542f5c412b48797f8d3d3 (patch) | |
tree | 3d74921049d5e95118677b655bd6382c7a34e135 /indra/newview/lldrawpoolbump.cpp | |
parent | 8aa65f67975fc362d1fcf1d085d646f5fa68798d (diff) |
SL-18700 Fix for shiny fullbright objects not rendering.
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 86473beace..cd9ff0192e 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -443,7 +443,20 @@ void LLDrawPoolBump::beginFullbrightShiny() } LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL; - if( cube_map ) + + if (cube_map) + { + // 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 + gGL.getTexUnit(1)->disable(); + cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); + cube_map->enableTexture(cube_channel); + diffuse_channel = shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); + + gGL.getTexUnit(cube_channel)->bind(cube_map); + gGL.getTexUnit(0)->activate(); + } + { LLMatrix4 mat; mat.initRows(LLVector4(gGLModelView+0), @@ -464,7 +477,6 @@ void LLDrawPoolBump::beginFullbrightShiny() LLVector4 vec4(vec, gShinyOrigin.mV[3]); shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV); - cube_map->setMatrix(1); if (LLPipeline::sReflectionProbesEnabled) { gPipeline.bindReflectionProbes(*shader); @@ -473,16 +485,6 @@ void LLDrawPoolBump::beginFullbrightShiny() { gPipeline.setEnvMat(*shader); } - - // 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 - gGL.getTexUnit(1)->disable(); - cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); - cube_map->enableTexture(cube_channel); - diffuse_channel = shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); - - gGL.getTexUnit(cube_channel)->bind(cube_map); - gGL.getTexUnit(0)->activate(); } if (mShaderLevel > 1) @@ -497,7 +499,6 @@ void LLDrawPoolBump::renderFullbrightShiny() { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); - if( gSky.mVOSkyp->getCubeMap() ) { LLGLEnable blend_enable(GL_BLEND); |