summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-07-06 12:53:42 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-07-12 15:17:32 -0700
commitafcb421bdc666d9b45fb5adb7098b7e433042823 (patch)
treec391d1467ac791ab15c593efbaf1b5af5a9d3691 /indra/newview/pipeline.cpp
parenteffb14913b7b5fd7024528ccab5df6fa030e7581 (diff)
SL-19567: (WIP) Add options to use higher precision for glow and post-process buffers. Disabled by default.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 0c767e7767..4183990261 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -840,7 +840,9 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mSceneMap.allocate(resX, resY, GL_RGB, true);
}
- mPostMap.allocate(resX, resY, GL_RGBA);
+ const bool post_hdr = gSavedSettings.getBOOL("RenderPostProcessingHDR");
+ const U32 post_color_fmt = post_hdr ? GL_RGBA16F : GL_RGBA;
+ mPostMap.allocate(resX, resY, post_color_fmt);
//HACK make screenbuffer allocations start failing after 30 seconds
if (gSavedSettings.getBOOL("SimulateFBOFailure"))
@@ -1163,9 +1165,11 @@ void LLPipeline::createGLBuffers()
// allocate screen space glow buffers
const U32 glow_res = llmax(1, llmin(512, 1 << gSavedSettings.getS32("RenderGlowResolutionPow")));
+ const bool glow_hdr = gSavedSettings.getBOOL("RenderGlowHDR");
+ const U32 glow_color_fmt = glow_hdr ? GL_RGBA16F : GL_RGBA;
for (U32 i = 0; i < 3; i++)
{
- mGlow[i].allocate(512, glow_res, GL_RGBA);
+ mGlow[i].allocate(512, glow_res, glow_color_fmt);
}
allocateScreenBuffer(resX, resY);