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.cpp63
1 files changed, 55 insertions, 8 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 0873300cd2..73582e2345 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -69,7 +69,7 @@ LLDrawPoolAlpha::~LLDrawPoolAlpha()
void LLDrawPoolAlpha::prerender()
{
- mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
+ mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
}
S32 LLDrawPoolAlpha::getNumPostDeferredPasses()
@@ -117,6 +117,14 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
fullbright_shader->uniform1f(LLShaderMgr::DISPLAY_GAMMA, (gamma > 0.1f) ? 1.0f / gamma : (1.0f/2.2f));
fullbright_shader->unbind();
+ if (LLPipeline::sRenderingHUDs)
+ {
+ fullbright_shader->uniform1i(LLShaderMgr::NO_ATMO, 1);
+ }
+ else
+ {
+ fullbright_shader->uniform1i(LLShaderMgr::NO_ATMO, 0);
+ }
//prime simple shader (loads shadow relevant uniforms)
gPipeline.bindDeferredShader(*simple_shader);
@@ -152,7 +160,7 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
}
deferred_render = TRUE;
- if (mVertexShaderLevel > 0)
+ if (mShaderLevel > 0)
{
// Start out with no shaders.
current_shader = target_shader = NULL;
@@ -201,7 +209,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass)
emissive_shader = &gObjectEmissiveProgram;
}
- if (mVertexShaderLevel > 0)
+ if (mShaderLevel > 0)
{
// Start out with no shaders.
current_shader = target_shader = NULL;
@@ -256,21 +264,53 @@ void LLDrawPoolAlpha::render(S32 pass)
mAlphaDFactor = LLRender::BF_ONE_MINUS_SOURCE_ALPHA; // }
gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
- if (mVertexShaderLevel > 0)
+ if (mShaderLevel > 0)
{
if (LLPipeline::sImpostorRender)
{
- fullbright_shader->bind();
+ fullbright_shader->bind();
fullbright_shader->setMinimumAlpha(0.5f);
+ if (LLPipeline::sRenderingHUDs)
+ {
+ fullbright_shader->uniform1i(LLShaderMgr::NO_ATMO, 1);
+ }
+ else
+ {
+ fullbright_shader->uniform1i(LLShaderMgr::NO_ATMO, 0);
+ }
simple_shader->bind();
simple_shader->setMinimumAlpha(0.5f);
+ if (LLPipeline::sRenderingHUDs)
+ {
+ simple_shader->uniform1i(LLShaderMgr::NO_ATMO, 1);
+ }
+ else
+ {
+ simple_shader->uniform1i(LLShaderMgr::NO_ATMO, 0);
+ }
}
else
{
fullbright_shader->bind();
fullbright_shader->setMinimumAlpha(0.f);
+ if (LLPipeline::sRenderingHUDs)
+ {
+ fullbright_shader->uniform1i(LLShaderMgr::NO_ATMO, 1);
+ }
+ else
+ {
+ fullbright_shader->uniform1i(LLShaderMgr::NO_ATMO, 0);
+ }
simple_shader->bind();
simple_shader->setMinimumAlpha(0.f);
+ if (LLPipeline::sRenderingHUDs)
+ {
+ simple_shader->uniform1i(LLShaderMgr::NO_ATMO, 1);
+ }
+ else
+ {
+ simple_shader->uniform1i(LLShaderMgr::NO_ATMO, 0);
+ }
}
}
else
@@ -286,7 +326,7 @@ void LLDrawPoolAlpha::render(S32 pass)
}
}
- if (mVertexShaderLevel > 0)
+ if (mShaderLevel > 0)
{
renderAlpha(getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, pass);
}
@@ -392,7 +432,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
bool is_particle_or_hud_particle = group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_PARTICLE
|| group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE;
- bool draw_glow_for_this_partition = mVertexShaderLevel > 0; // no shaders = no glow.
+ bool draw_glow_for_this_partition = mShaderLevel > 0; // no shaders = no glow.
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_GROUP_LOOP);
@@ -610,7 +650,14 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
LLRender::BF_ONE, LLRender::BF_ONE); // add to alpha (glow)
emissive_shader->bind();
-
+ if (LLPipeline::sRenderingHUDs)
+ {
+ emissive_shader->uniform1i(LLShaderMgr::NO_ATMO, 1);
+ }
+ else
+ {
+ emissive_shader->uniform1i(LLShaderMgr::NO_ATMO, 0);
+ }
params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
// do the actual drawing, again