diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-07 10:36:59 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-07 10:36:59 -0500 |
commit | 3e1db1f18405d50a63d772722175c859c1952f92 (patch) | |
tree | 287f4133b791afe63710f633b0468c56c05d3b73 | |
parent | 616f2b639bc6907e810664522304305337646292 (diff) |
SL-17532 Cleanup from hasty commit (thanks to Henri for the prodding).
-rw-r--r-- | indra/newview/lldrawpoolalpha.cpp | 34 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 2 |
2 files changed, 8 insertions, 28 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 70ffd85608..6c1abb24c9 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -50,8 +50,6 @@ #include "llglcommonfunc.h" #include "llvoavatar.h" -#pragma optimize("", off) - BOOL LLDrawPoolAlpha::sShowDebugAlpha = FALSE; #define current_shader (LLGLSLShader::sCurBoundShaderPtr) @@ -60,11 +58,9 @@ static BOOL deferred_render = FALSE; // minimum alpha before discarding a fragment static const F32 MINIMUM_ALPHA = 0.004f; // ~ 1/255 -static const F32 MINIMUM_RIGGED_ALPHA = MINIMUM_ALPHA; // minimum alpha before discarding a fragment when rendering impostors static const F32 MINIMUM_IMPOSTOR_ALPHA = 0.1f; -static const F32 MINIMUM_IMPOSTOR_RIGGED_ALPHA = 0.1f; LLDrawPoolAlpha::LLDrawPoolAlpha(U32 type) : LLRenderPass(type), target_shader(NULL), @@ -116,25 +112,11 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d if (LLPipeline::sImpostorRender) { - if (shader->mRiggedVariant == shader) - { - shader->setMinimumAlpha(MINIMUM_IMPOSTOR_RIGGED_ALPHA); - } - else - { - shader->setMinimumAlpha(MINIMUM_IMPOSTOR_ALPHA); - } + shader->setMinimumAlpha(MINIMUM_IMPOSTOR_ALPHA); } else { - if (shader->mRiggedVariant == shader) - { - shader->setMinimumAlpha(MINIMUM_RIGGED_ALPHA); - } - else - { - shader->setMinimumAlpha(MINIMUM_ALPHA); - } + shader->setMinimumAlpha(MINIMUM_ALPHA); } if (textureGamma) { @@ -207,7 +189,7 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass) } //set some generic parameters for forward (non-deferred) rendering -static void prepare_forward_shader(LLGLSLShader* shader, F32 minimum_alpha, F32 minimum_rigged_alpha) +static void prepare_forward_shader(LLGLSLShader* shader, F32 minimum_alpha) { shader->bind(); shader->setMinimumAlpha(minimum_alpha); @@ -216,7 +198,7 @@ static void prepare_forward_shader(LLGLSLShader* shader, F32 minimum_alpha, F32 //also prepare rigged variant if (shader->mRiggedVariant && shader->mRiggedVariant != shader) { - prepare_forward_shader(shader->mRiggedVariant, minimum_rigged_alpha, minimum_rigged_alpha); + prepare_forward_shader(shader->mRiggedVariant, minimum_alpha); } } @@ -234,19 +216,17 @@ void LLDrawPoolAlpha::render(S32 pass) (LLPipeline::sUnderWaterRender) ? &gObjectEmissiveWaterProgram : &gObjectEmissiveProgram; F32 minimum_alpha = MINIMUM_ALPHA; - F32 minimum_rigged_alpha = MINIMUM_RIGGED_ALPHA; if (LLPipeline::sImpostorRender) { minimum_alpha = MINIMUM_IMPOSTOR_ALPHA; - minimum_rigged_alpha = MINIMUM_IMPOSTOR_RIGGED_ALPHA; } - prepare_forward_shader(fullbright_shader, minimum_alpha, minimum_rigged_alpha); - prepare_forward_shader(simple_shader, minimum_alpha, minimum_rigged_alpha); + prepare_forward_shader(fullbright_shader, minimum_alpha); + prepare_forward_shader(simple_shader, minimum_alpha); for (int i = 0; i < LLMaterial::SHADER_COUNT; ++i) { - prepare_forward_shader(LLPipeline::sUnderWaterRender ? &gDeferredMaterialWaterProgram[i] : &gDeferredMaterialProgram[i], minimum_alpha, minimum_rigged_alpha); + prepare_forward_shader(LLPipeline::sUnderWaterRender ? &gDeferredMaterialWaterProgram[i] : &gDeferredMaterialProgram[i], minimum_alpha); } //first pass -- rigged only and drawn to depth buffer diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index eb1e2cbd80..f47fb6287c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5505,7 +5505,7 @@ U32 get_linkset_index(LLVOVolume* vobj) LLViewerObject* root = vobj->getRootEdit(); U32 idx = 1; - for (auto& child : root->getChildren()) + for (const auto& child : root->getChildren()) { if (child == vobj) { |