diff options
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 105 |
1 files changed, 2 insertions, 103 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index e96e7cbe6c..3a083fd50d 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -696,14 +696,6 @@ void LLDrawPoolAvatar::beginRigid() { //eyeballs render with the specular shader sVertexProgram->bind(); sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } } } else @@ -754,14 +746,6 @@ void LLDrawPoolAvatar::beginDeferredRigid() sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); sVertexProgram->bind(); sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } } void LLDrawPoolAvatar::endDeferredRigid() @@ -805,14 +789,6 @@ void LLDrawPoolAvatar::beginSkinned() sVertexProgram->bind(); sVertexProgram->enableTexture(LLViewerShaderMgr::BUMP_MAP); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } gGL.getTexUnit(0)->activate(); } else @@ -822,14 +798,6 @@ void LLDrawPoolAvatar::beginSkinned() // software skinning, use a basic shader for windlight. // TODO: find a better fallback method for software skinning. sVertexProgram->bind(); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } } } @@ -892,14 +860,6 @@ void LLDrawPoolAvatar::beginRiggedSimple() { sDiffuseChannel = 0; sVertexProgram->bind(); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } } } @@ -966,15 +926,6 @@ void LLDrawPoolAvatar::beginRiggedGlow() sVertexProgram->uniform1f(LLShaderMgr::TEXTURE_GAMMA, LLPipeline::sRenderDeferred ? 2.2f : 1.1f); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } - F32 gamma = gSavedSettings.getF32("RenderDeferredDisplayGamma"); sVertexProgram->uniform1f(LLShaderMgr::DISPLAY_GAMMA, (gamma > 0.1f) ? 1.0f / gamma : (1.0f/2.2f)); } @@ -1025,12 +976,10 @@ void LLDrawPoolAvatar::beginRiggedFullbright() if (LLPipeline::sRenderingHUDs) { sVertexProgram->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0f); - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); } else if (LLPipeline::sRenderDeferred) { sVertexProgram->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); F32 gamma = gSavedSettings.getF32("RenderDeferredDisplayGamma"); sVertexProgram->uniform1f(LLShaderMgr::DISPLAY_GAMMA, (gamma > 0.1f) ? 1.0f / gamma : (1.0f/2.2f)); } @@ -1080,14 +1029,6 @@ void LLDrawPoolAvatar::beginRiggedShinySimple() if (sShaderLevel > 0 || gPipeline.canUseVertexShaders()) { sVertexProgram->bind(); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } LLDrawPoolBump::bindCubeMap(sVertexProgram, 2, sDiffuseChannel, cube_channel, false); } } @@ -1138,32 +1079,22 @@ void LLDrawPoolAvatar::beginRiggedFullbrightShiny() if (sShaderLevel > 0 || gPipeline.canUseVertexShaders()) { sVertexProgram->bind(); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } + LLDrawPoolBump::bindCubeMap(sVertexProgram, 2, sDiffuseChannel, cube_channel, false); if (LLPipeline::sRenderingHUDs) { sVertexProgram->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0f); - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); } else if (LLPipeline::sRenderDeferred) { sVertexProgram->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); F32 gamma = gSavedSettings.getF32("RenderDeferredDisplayGamma"); sVertexProgram->uniform1f(LLShaderMgr::DISPLAY_GAMMA, (gamma > 0.1f) ? 1.0f / gamma : (1.0f/2.2f)); - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); } else { sVertexProgram->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0f); - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); } } } @@ -1184,15 +1115,7 @@ void LLDrawPoolAvatar::beginDeferredRiggedSimple() { sVertexProgram = &gDeferredSkinnedDiffuseProgram; sDiffuseChannel = 0; - sVertexProgram->bind(); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } + sVertexProgram->bind(); } void LLDrawPoolAvatar::endDeferredRiggedSimple() @@ -1206,14 +1129,6 @@ void LLDrawPoolAvatar::beginDeferredRiggedBump() { sVertexProgram = &gDeferredSkinnedBumpProgram; sVertexProgram->bind(); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::BUMP_MAP); sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); } @@ -1246,14 +1161,6 @@ void LLDrawPoolAvatar::beginDeferredRiggedMaterial(S32 pass) } sVertexProgram->bind(); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::BUMP_MAP); specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP); sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); @@ -1287,14 +1194,6 @@ void LLDrawPoolAvatar::beginDeferredSkinned() sVertexProgram->bind(); sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha); - if (LLPipeline::sRenderingHUDs) - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 1); - } - else - { - sVertexProgram->uniform1i(LLShaderMgr::NO_ATMO, 0); - } sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); gGL.getTexUnit(0)->activate(); |