From f16372ac7e84e6095dda999a23d9bce68f935600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Garc=C3=ADa=20Li=C3=B1=C3=A1n?= <fernandogarcialinan@gmail.com> Date: Mon, 16 Aug 2021 21:51:37 +0200 Subject: [PATCH] HDR: Add property to show debug views of the GBuffer --- Compositor/HDR/debug-pass.xml | 9 +++++++++ Compositor/HDR/hdr.xml | 22 ++++++---------------- defaults.xml | 1 + 3 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 Compositor/HDR/debug-pass.xml diff --git a/Compositor/HDR/debug-pass.xml b/Compositor/HDR/debug-pass.xml new file mode 100644 index 000000000..76dae1367 --- /dev/null +++ b/Compositor/HDR/debug-pass.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> + +<PropertyList> + <type>quad</type> + <clear-mask>depth</clear-mask> + <condition> + <property>/sim/rendering/hdr/debug/show-gbuffer</property> + </condition> +</PropertyList> diff --git a/Compositor/HDR/hdr.xml b/Compositor/HDR/hdr.xml index 0d523eb60..d36592276 100644 --- a/Compositor/HDR/hdr.xml +++ b/Compositor/HDR/hdr.xml @@ -1022,13 +1022,10 @@ </binding> </pass> - <!-- DEBUG PASSES --> - <!-- - <pass> + <!-- Debug passes --> + <pass include="debug-pass.xml"> <name>debug-albedo</name> - <type>quad</type> <effect>Effects/HDR/trivial</effect> - <clear-mask>depth</clear-mask> <geometry> <left>0.0</left> <bottom>0.0</bottom> @@ -1040,11 +1037,9 @@ <buffer>gbuffer0</buffer> </binding> </pass> - <pass> + <pass include="debug-pass.xml"> <name>debug-normals</name> - <type>quad</type> <effect>Effects/HDR/trivial</effect> - <clear-mask>depth</clear-mask> <geometry> <left>0.8</left> <bottom>0.0</bottom> @@ -1056,11 +1051,9 @@ <buffer>gbuffer1</buffer> </binding> </pass> - <pass> + <pass include="debug-pass.xml"> <name>debug-materials</name> - <type>quad</type> <effect>Effects/HDR/trivial</effect> - <clear-mask>depth</clear-mask> <geometry> <left>0.0</left> <bottom>0.8</bottom> @@ -1072,11 +1065,9 @@ <buffer>gbuffer2</buffer> </binding> </pass> - <pass> + <pass include="debug-pass.xml"> <name>debug-depth</name> - <type>quad</type> - <effect>Effects/HDR/trivial</effect> - <clear-mask>depth</clear-mask> + <effect>Effects/HDR/visualize-depth</effect> <geometry> <left>0.8</left> <bottom>0.8</bottom> @@ -1088,5 +1079,4 @@ <buffer>depth</buffer> </binding> </pass> - --> </PropertyList> diff --git a/defaults.xml b/defaults.xml index 296f0902b..dbc12c2f1 100644 --- a/defaults.xml +++ b/defaults.xml @@ -384,6 +384,7 @@ Started September 2000 by David Megginson, david@megginson.com </pilot-model> <hdr> <debug> + <show-gbuffer type="bool">false</show-gbuffer> <display-ev100 type="bool">false</display-ev100> </debug> <exposure-compensation type="float">0.0</exposure-compensation>