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.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 259ea0c84f..4316b850e3 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.