From eed433ce9f300429c935ee08dd7dced8ab8d4b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Garc=C3=ADa=20Li=C3=B1=C3=A1n?= Date: Mon, 23 Aug 2021 12:44:26 +0200 Subject: [PATCH] HDR: Use stencil buffer for optimization purposes --- Compositor/HDR/hdr.xml | 38 ++++++++++++++----- Effects/HDR/lighting.eff | 4 ++ .../HDR/smaa-blending-weight-calculation.eff | 4 ++ Effects/HDR/smaa-edge-detection.eff | 5 +++ Effects/model-combined.eff | 5 +++ Effects/model-default.eff | 5 +++ Effects/model-pbr.eff | 5 +++ Effects/terrain-default.eff | 5 +++ Effects/ws30.eff | 5 +++ Effects/ws30water.eff | 5 +++ Shaders/HDR/lighting.frag | 3 -- 11 files changed, 72 insertions(+), 12 deletions(-) diff --git a/Compositor/HDR/hdr.xml b/Compositor/HDR/hdr.xml index 69ef3e307..b88d69751 100644 --- a/Compositor/HDR/hdr.xml +++ b/Compositor/HDR/hdr.xml @@ -39,11 +39,11 @@ rgba8 - depth + depth-stencil 2d screen screen - depth32f + depth32f-stencil @@ -612,7 +612,7 @@ geometry scene hdr-geometry - depth + depth stencil 0.0 0xfffff7ff @@ -629,7 +629,11 @@ depth - depth + depth-stencil + + + stencil + depth-stencil @@ -686,7 +690,7 @@ Effects/HDR/ao 0 - depth + depth-stencil 1 @@ -725,7 +729,7 @@ 3 - depth + depth-stencil 7 @@ -751,6 +755,10 @@ color0 hdr-result + + stencil + depth-stencil +