summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-02-01 02:06:36 -0600
committerDave Parks <davep@lindenlab.com>2011-02-01 02:06:36 -0600
commitd3bfbd8ebbaa2b891114de4dac52ba6cbcadce3b (patch)
tree864f18e0023220a9bf06e7f4dc27928ef002e16d /indra/newview/pipeline.cpp
parentfaac42bca702d9b4126c3ca4b5656074dc7846f4 (diff)
SH-483 Fix for varioius issues with hi-rez snapshots -- mainly disable the ability to take hi-rez snapshots if UI or HUD attachments are in the snapshot, and go back to old tile compositing method instead of using huge framebuffer objects.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 59b526059b..39bc354250 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5432,7 +5432,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
- if (for_snapshot)
+ /*if (for_snapshot)
{
gGL.getTexUnit(0)->bind(&mGlow[1]);
{
@@ -5443,14 +5443,21 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
// If the snapshot is constructed from tiles, calculate which
// tile we're in.
- const S32 num_horizontal_tiles = llceil(zoom_factor);
- const LLVector2 tile(subfield % num_horizontal_tiles,
- (S32)(subfield / num_horizontal_tiles));
- llassert(zoom_factor > 0.0); // Non-zero, non-negative.
- const F32 tile_size = 1.0/zoom_factor;
-
- tc1 = tile*tile_size; // Top left texture coordinates
- tc2 = (tile+LLVector2(1,1))*tile_size; // Bottom right texture coordinates
+
+ //from LLViewerCamera::setPerpsective
+ if (zoom_factor > 1.f)
+ {
+ int pos_y = subfield / llceil(zoom_factor);
+ int pos_x = subfield - (pos_y*llceil(zoom_factor));
+ F32 size = 1.f/zoom_factor;
+
+ tc1.set(pos_x*size, pos_y*size);
+ tc2 = tc1 + LLVector2(size,size);
+ }
+ else
+ {
+ tc2.set(1,1);
+ }
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ADD);
@@ -5483,7 +5490,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glPopMatrix();
return;
- }
+ }*/
{
{