summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-05-12 03:59:01 -0500
committerDave Parks <davep@lindenlab.com>2010-05-12 03:59:01 -0500
commit6c086be01659a0d23a91bf6e3ea07bafd86c4dd7 (patch)
tree8be1aef2dad6222e0cbc848bee19a5b663c6016a /indra/newview/lldrawpoolbump.cpp
parent1928970c6b4e6fc12f54b8235e5022f0a729017e (diff)
Fix for fullbright bump not working in deferred render.
Fix for shadow artifacts around split frusta. Tweak for shadow aliasing with projectors. Fix for crash on exit in mesh thread. (transplanted from 6dcf09cd3e524016c8130a0c8af3d9fc95f2d411)
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r--indra/newview/lldrawpoolbump.cpp44
1 files changed, 34 insertions, 10 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 8f3e775976..08c9f7fe15 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -618,9 +618,9 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
}
//static
-void LLDrawPoolBump::beginBump()
+void LLDrawPoolBump::beginBump(U32 pass)
{
- if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_BUMP))
+ if (!gPipeline.hasRenderBatches(pass))
{
return;
}
@@ -663,9 +663,9 @@ void LLDrawPoolBump::beginBump()
}
//static
-void LLDrawPoolBump::renderBump()
+void LLDrawPoolBump::renderBump(U32 pass)
{
- if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_BUMP))
+ if (!gPipeline.hasRenderBatches(pass))
{
return;
}
@@ -678,13 +678,13 @@ void LLDrawPoolBump::renderBump()
/// Get rid of z-fighting with non-bump pass.
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
- renderBump(LLRenderPass::PASS_BUMP, sVertexMask);
+ renderBump(pass, sVertexMask);
}
//static
-void LLDrawPoolBump::endBump()
+void LLDrawPoolBump::endBump(U32 pass)
{
- if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_BUMP))
+ if (!gPipeline.hasRenderBatches(pass))
{
return;
}
@@ -767,17 +767,41 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
void LLDrawPoolBump::beginPostDeferredPass(S32 pass)
{
- beginFullbrightShiny();
+ switch (pass)
+ {
+ case 0:
+ beginFullbrightShiny();
+ break;
+ case 1:
+ beginBump(LLRenderPass::PASS_POST_BUMP);
+ break;
+ }
}
void LLDrawPoolBump::endPostDeferredPass(S32 pass)
{
- endFullbrightShiny();
+ switch (pass)
+ {
+ case 0:
+ endFullbrightShiny();
+ break;
+ case 1:
+ endBump(LLRenderPass::PASS_POST_BUMP);
+ break;
+ }
}
void LLDrawPoolBump::renderPostDeferred(S32 pass)
{
- renderFullbrightShiny();
+ switch (pass)
+ {
+ case 0:
+ renderFullbrightShiny();
+ break;
+ case 1:
+ renderBump(LLRenderPass::PASS_POST_BUMP);
+ break;
+ }
}
////////////////////////////////////////////////////////////////