summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorAdam Moss <c@yotes.com>2012-04-21 18:33:07 +0100
committerAdam Moss <c@yotes.com>2012-04-21 18:33:07 +0100
commit442c5cf339ddffb10db9f819704bf77ad941bc28 (patch)
tree0ee758e66bcc5ebdec7fa1739ec8b981f1e92240 /indra/newview/pipeline.cpp
parent03442801bd8018318efb4a4e763dc8969fd11ed7 (diff)
STORM-1819: Ternary/graded shadow support
a bunch of trivial clean-ups and commentary.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 22a1a5b45a..e098aa244b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -425,8 +425,6 @@ LLPipeline::LLPipeline() :
mLightingDetail(0),
mScreenWidth(0),
mScreenHeight(0)
- // mSunShadowMapWidth(0),
- // mSpotShadowMapWidth(0)
{
mNoiseMap = 0;
mTrueNoiseMap = 0;
@@ -851,10 +849,10 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (shadow_detail > 0)
{ //allocate 4 sun shadow maps
- U32 mSunShadowMapWidth = ((U32(resX*scale)+1)&~1); // must be even to avoid a stripe in the horizontal shadow blur
+ U32 sun_shadow_map_width = ((U32(resX*scale)+1)&~1); // must be even to avoid a stripe in the horizontal shadow blur
for (U32 i = 0; i < 4; i++)
{
- if (!mShadow[i].allocate(mSunShadowMapWidth,U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
+ if (!mShadow[i].allocate(sun_shadow_map_width,U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
}
}
else
@@ -863,7 +861,6 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
mShadow[i].release();
}
- //mSunShadowMapWidth = 0;
}
U32 width = nhpo2(U32(resX*scale))/2;
@@ -871,10 +868,10 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (shadow_detail > 1)
{ //allocate two spot shadow maps
- U32 mSpotShadowMapWidth = width;
+ U32 spot_shadow_map_width = width;
for (U32 i = 4; i < 6; i++)
{
- if (!mShadow[i].allocate(mSpotShadowMapWidth, height, 0, TRUE, FALSE)) return false;
+ if (!mShadow[i].allocate(spot_shadow_map_width, height, 0, TRUE, FALSE)) return false;
}
}
else
@@ -883,7 +880,6 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
mShadow[i].release();
}
- //mSpotShadowMapWidth = 0;
}
// don't disable shaders on next session
@@ -8394,7 +8390,6 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
gDeferredShadowAlphaMaskProgram.bind();
gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f);
gDeferredShadowAlphaMaskProgram.uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
- // llwarns << "target_width is " << target_width << llendl;
U32 mask = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0 |