summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp34
1 files changed, 7 insertions, 27 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