summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-11-20 21:25:06 +0100
committerGuru <alexandrgproductengine@lindenlab.com>2023-11-21 12:41:40 +0100
commit70eda83fb08c5c4e8b0ea95868243d744c6e88e9 (patch)
tree93c23cd9b9226c768a71b97ec58468adf5cdf7c4 /indra/newview/pipeline.cpp
parentd6e7b5d73e2dd57ede568fe52ba2726ee861f9fa (diff)
SL-20563 Add 'No Post' option to Snapshot floater
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 9266c84540..64d247a202 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -211,6 +211,7 @@ extern S32 gBoxFrame;
extern BOOL gDisplaySwapBuffers;
extern BOOL gDebugGL;
extern BOOL gCubeSnapshot;
+extern BOOL gSnapshotNoPost;
bool gAvatarBacklight = false;
@@ -6791,7 +6792,7 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
{
LL_PROFILE_GPU_ZONE("gamma correct");
- static LLCachedControl<bool> no_post(gSavedSettings, "RenderDisablePostProcessing", false);
+ static LLCachedControl<bool> buildNoPost(gSavedSettings, "RenderDisablePostProcessing", false);
LLGLDepthTest depth(GL_FALSE, GL_FALSE);
@@ -6801,7 +6802,8 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- LLGLSLShader& shader = no_post && gFloaterTools->isAvailable() ? gNoPostGammaCorrectProgram : // no post (no gamma, no exposure, no tonemapping)
+ bool no_post = gSnapshotNoPost || (buildNoPost && gFloaterTools->isAvailable());
+ LLGLSLShader& shader = no_post ? gNoPostGammaCorrectProgram : // no post (no gamma, no exposure, no tonemapping)
psky->getReflectionProbeAmbiance(should_auto_adjust) == 0.f ? gLegacyPostGammaCorrectProgram :
gDeferredPostGammaCorrectProgram;