summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 259ea0c84f..3b72e512da 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -820,9 +820,8 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
-
- static LLCachedControl<bool> has_hdr(gSavedSettings, "RenderHDREnabled", true);
- bool hdr = gGLManager.mGLVersion > 4.05f && has_hdr();
+ bool has_hdr = gSavedSettings.getBOOL("RenderHDREnabled");
+ bool hdr = gGLManager.mGLVersion > 4.05f && has_hdr;
if (mRT == &mMainRT)
{ // hacky -- allocate auxillary buffer
@@ -888,6 +887,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
if (!gCubeSnapshot) // hack to not re-allocate various targets for cube snapshots
{
+ U32 post_color_fmt = gSavedSettings.getBOOL("RenderHighPrecisionPostProcess") ? GL_RGBA16F : GL_RGBA;
+
if (RenderUIBuffer)
{
if (!mUIScreen.allocate(resX, resY, GL_RGBA))
@@ -898,10 +899,10 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
if (RenderFSAAType > 0)
{
- if (!mFXAAMap.allocate(resX, resY, GL_RGBA)) return false;
+ if (!mFXAAMap.allocate(resX, resY, post_color_fmt)) return false;
if (RenderFSAAType == 2)
{
- if (!mSMAABlendBuffer.allocate(resX, resY, GL_RGBA, false)) return false;
+ if (!mSMAABlendBuffer.allocate(resX, resY, post_color_fmt, false)) return false;
}
}
else
@@ -922,8 +923,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
mSceneMap.release();
}
- mPostPingMap.allocate(resX, resY, GL_RGBA);
- mPostPongMap.allocate(resX, resY, GL_RGBA);
+ mPostPingMap.allocate(resX, resY, post_color_fmt);
+ mPostPongMap.allocate(resX, resY, post_color_fmt);
// The water exclusion mask needs its own depth buffer so we can take care of the problem of multiple water planes.
// Should we ever make water not just a plane, it also aids with that as well as the water planes will be rendered into the mask.
@@ -5535,7 +5536,7 @@ static F32 calc_light_dist(LLVOVolume* light, const LLVector3& cam_pos, F32 max_
if (light->mDrawable.notNull() && light->mDrawable->isState(LLDrawable::ACTIVE))
{
// moving lights get a little higher priority (too much causes artifacts)
- dist = llmax(dist - light->getLightRadius()*0.25f, 0.f);
+ dist = llmax(dist - radius * 0.25f, 0.f);
}
return dist;
}