summaryrefslogtreecommitdiff
path: root/indra/newview/llgltfmaterialpreviewmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgltfmaterialpreviewmgr.cpp')
-rw-r--r--indra/newview/llgltfmaterialpreviewmgr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index 36bd552c31..1c39f1ae7d 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -517,9 +517,12 @@ BOOL LLGLTFPreviewTexture::render()
screen.flush();
}
+ // *HACK: Hide mExposureMap from generateExposure
+ gPipeline.mExposureMap.swapFBORefs(gPipeline.mLastExposure);
+
gPipeline.copyScreenSpaceReflections(&screen, &gPipeline.mSceneMap);
gPipeline.generateLuminance(&screen, &gPipeline.mLuminanceMap);
- gPipeline.generateExposure(&gPipeline.mLuminanceMap, &gPipeline.mExposureMap);
+ gPipeline.generateExposure(&gPipeline.mLuminanceMap, &gPipeline.mExposureMap, /*use_history = */ false);
gPipeline.gammaCorrect(&screen, &gPipeline.mPostMap);
LLVertexBuffer::unbind();
gPipeline.generateGlow(&gPipeline.mPostMap);
@@ -527,6 +530,9 @@ BOOL LLGLTFPreviewTexture::render()
gPipeline.renderDoF(&screen, &gPipeline.mPostMap);
gPipeline.applyFXAA(&gPipeline.mPostMap, &screen);
+ // *HACK: Restore mExposureMap (it will be consumed by generateExposure next frame)
+ gPipeline.mExposureMap.swapFBORefs(gPipeline.mLastExposure);
+
// Final render
gDeferredPostNoDoFProgram.bind();