Sorted out high-res snapshot issues.

LL has since removed high-res snapshots using render targets. I find this change to be favorable, as rendertargets were very finicky to get working with anti-aliasing. Also, deferred rendering uses many rendertargets that depend on screen resolution. Changing resolution every screenshot is.. not very awesome.

There is some deviation from LL's viewer. I've kept the old tiled glow pass enabled for non-deferred, as it fixes issues with tile edges truncating glow propogation. However, this does no work with deferred yet. I need to pin down why. I assume using binding one of the RenderTargets is required for deferred.

Additionally, the usage of a RenderTarget for snapshots is what prevented me from fully enabling my supersampling settings. Now that that hurdle is gone, I consider including this new setting by default to be safe enough.

And a note: Do not remove the 'tiling' variable when merging with v2 changes, as singu's glow pass is 'special'. There are other fixes absent from LL's viewer that require knowing if the render is tiled or not. (water reflections/cloud freezing)
This commit is contained in:
Shyotl
2011-04-21 23:36:41 -05:00
parent 673a338bf5
commit 98c2b7e11f
6 changed files with 66 additions and 75 deletions

View File

@@ -224,11 +224,7 @@ glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
return ret;
}
#if SHY_MOD //screenshot improvement
void display_update_camera(bool tiling=false);
#else //shy_mod
void display_update_camera();
#endif //ignore
//----------------------------------------
S32 LLPipeline::sCompiles = 0;
@@ -5300,7 +5296,7 @@ void LLPipeline::bindScreenToTexture()
}
void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, bool tiling)
{
if (!(gPipeline.canUseVertexShaders() &&
sRenderGlow))
@@ -5352,7 +5348,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 (tiling && !LLPipeline::sRenderDeferred) //Need to coax this into working with deferred now that tiling is back.
{
gGL.getTexUnit(0)->bind(&mGlow[1]);
{
@@ -5374,7 +5370,6 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ADD);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.color4f(1,1,1,1);
@@ -5462,10 +5457,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
const U32 glow_res = llmax(1,
llmin(1024, 1 << glowResPow));
static const LLCachedControl<S32> glow_iters("RenderGlowIterations",2);//*2;
static const LLCachedControl<S32> glow_iters("RenderGlowIterations",2);
S32 kernel = glow_iters*2;
static const LLCachedControl<F32> glow_width("RenderGlowWidth",1.3f);// / glow_res;
F32 delta = glow_width/glow_res;
static const LLCachedControl<F32> glow_width("RenderGlowWidth",1.3f);
F32 delta = glow_width*zoom_factor/glow_res;
// Use half the glow width if we have the res set to less than 9 so that it looks
// almost the same in either case.
if (glowResPow < 9)