summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsimple.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-04-10 00:27:32 -0500
committerDave Parks <davep@lindenlab.com>2013-04-10 00:27:32 -0500
commit78d23e66425265e43584c6c4fd4fce9c675f4771 (patch)
tree74042c738f5c1e039e7da13e021fdcd43fc6735c /indra/newview/lldrawpoolsimple.cpp
parent5425e3fa8978ce37f85ab15c77ef5380360970c4 (diff)
NORSPEC-75 Add appropriate draw calls to underwater render passes so objects with material data don't disappear in water.
Diffstat (limited to 'indra/newview/lldrawpoolsimple.cpp')
-rw-r--r--indra/newview/lldrawpoolsimple.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 6e0ea78af2..1dbaad9c18 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -198,7 +198,11 @@ void LLDrawPoolSimple::render(S32 pass)
if (LLPipeline::sRenderDeferred)
{ //if deferred rendering is enabled, bump faces aren't registered as simple
//render bump faces here as simple so bump faces will appear under water
- pushBatches(LLRenderPass::PASS_BUMP, mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_BUMP, mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_MATERIAL, mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_SPECMAP, mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_NORMMAP, mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_NORMSPEC, mask, TRUE, TRUE);
}
}
else
@@ -355,6 +359,11 @@ void LLDrawPoolFullbright::renderPostDeferred(S32 pass)
gGL.setSceneBlendType(LLRender::BT_ALPHA);
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX;
pushBatches(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask, TRUE, TRUE);
+
+ pushBatches(LLRenderPass::PASS_MATERIAL_ALPHA_EMISSIVE, fullbright_mask, TRUE, FALSE);
+ pushBatches(LLRenderPass::PASS_SPECMAP_EMISSIVE, fullbright_mask, TRUE, FALSE);
+ pushBatches(LLRenderPass::PASS_NORMMAP_EMISSIVE, fullbright_mask, TRUE, FALSE);
+ pushBatches(LLRenderPass::PASS_NORMSPEC_EMISSIVE, fullbright_mask, TRUE, FALSE);
}
void LLDrawPoolFullbright::endPostDeferredPass(S32 pass)
@@ -405,12 +414,20 @@ void LLDrawPoolFullbright::render(S32 pass)
fullbright_shader->uniform1f(LLViewerShaderMgr::FULLBRIGHT, 1.f);
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX;
pushBatches(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_MATERIAL_ALPHA_EMISSIVE, fullbright_mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_SPECMAP_EMISSIVE, fullbright_mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_NORMMAP_EMISSIVE, fullbright_mask, TRUE, TRUE);
+ pushBatches(LLRenderPass::PASS_NORMSPEC_EMISSIVE, fullbright_mask, TRUE, TRUE);
}
else
{
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR;
renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask);
+ pushBatches(LLRenderPass::PASS_MATERIAL_ALPHA_EMISSIVE, fullbright_mask);
+ pushBatches(LLRenderPass::PASS_SPECMAP_EMISSIVE, fullbright_mask);
+ pushBatches(LLRenderPass::PASS_NORMMAP_EMISSIVE, fullbright_mask);
+ pushBatches(LLRenderPass::PASS_NORMSPEC_EMISSIVE, fullbright_mask);
}
stop_glerror();