2021-04-10 09:14:16 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<PropertyList>
|
|
|
|
<name>HDR</name>
|
|
|
|
<!-- XXX: These won't be necessary once we go core profile only -->
|
|
|
|
<use-osg-uniforms>true</use-osg-uniforms>
|
|
|
|
<use-vertex-attribute-aliasing>true</use-vertex-attribute-aliasing>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
G-Buffer
|
|
|
|
.........................................................
|
|
|
|
: Buffer : Red : Green : Blue : Alpha :
|
|
|
|
:........:...........:...........:..........:...........:
|
|
|
|
: RT0 : albedo.r : albedo.g : albedo.b : AO/Cavity :
|
|
|
|
: RT1 : normal.x : normal.y :
|
|
|
|
: RT2 : Metalness : Roughness : Clearcoat :
|
|
|
|
: RT3 : Depth :
|
|
|
|
:........:...........:...........:..........:...........:
|
|
|
|
-->
|
|
|
|
<buffer>
|
|
|
|
<name>gbuffer0</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>screen</width>
|
|
|
|
<height>screen</height>
|
|
|
|
<format>rgba8</format>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
|
|
|
<name>gbuffer1</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>screen</width>
|
|
|
|
<height>screen</height>
|
|
|
|
<format>rg16f</format>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
|
|
|
<name>gbuffer2</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>screen</width>
|
|
|
|
<height>screen</height>
|
|
|
|
<format>rgba8</format>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
|
|
|
<name>depth</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>screen</width>
|
|
|
|
<height>screen</height>
|
|
|
|
<format>depth32f</format>
|
|
|
|
</buffer>
|
|
|
|
|
|
|
|
<!-- HDR lighting result -->
|
|
|
|
<buffer>
|
|
|
|
<name>hdr-result</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>screen</width>
|
|
|
|
<height>screen</height>
|
|
|
|
<format>rgb16f</format>
|
|
|
|
</buffer>
|
|
|
|
|
2021-07-26 10:10:58 +00:00
|
|
|
<!-- Final LDR buffer -->
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>
|
2021-07-26 10:10:58 +00:00
|
|
|
<name>final</name>
|
2021-04-10 09:14:16 +00:00
|
|
|
<type>2d</type>
|
|
|
|
<width>screen</width>
|
|
|
|
<height>screen</height>
|
2021-07-26 10:10:58 +00:00
|
|
|
<format>rgb8</format>
|
2021-04-10 09:14:16 +00:00
|
|
|
</buffer>
|
|
|
|
|
2021-07-26 10:10:58 +00:00
|
|
|
<!-- Atmosphere LUTs -->
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>
|
2021-07-28 07:40:04 +00:00
|
|
|
<name>transmittance</name>
|
2021-04-10 09:14:16 +00:00
|
|
|
<type>2d</type>
|
2021-07-26 10:10:58 +00:00
|
|
|
<width>256</width>
|
2021-07-28 07:40:04 +00:00
|
|
|
<height>64</height>
|
2021-07-26 10:10:58 +00:00
|
|
|
<format>rgb16f</format>
|
|
|
|
<min-filter>linear</min-filter>
|
|
|
|
<mag-filter>linear</mag-filter>
|
2021-07-28 07:40:04 +00:00
|
|
|
<wrap-s>clamp-to-edge</wrap-s>
|
2021-07-26 10:10:58 +00:00
|
|
|
<wrap-t>clamp-to-edge</wrap-t>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
2021-07-28 07:40:04 +00:00
|
|
|
<name>multiple-scattering</name>
|
2021-07-26 10:10:58 +00:00
|
|
|
<type>2d</type>
|
2021-07-28 07:40:04 +00:00
|
|
|
<width>32</width>
|
2021-07-26 10:10:58 +00:00
|
|
|
<height>32</height>
|
2021-07-28 07:40:04 +00:00
|
|
|
<format>rgb16f</format>
|
2021-07-26 10:10:58 +00:00
|
|
|
<min-filter>linear</min-filter>
|
|
|
|
<mag-filter>linear</mag-filter>
|
|
|
|
<wrap-s>clamp-to-edge</wrap-s>
|
|
|
|
<wrap-t>clamp-to-edge</wrap-t>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
2021-07-28 07:40:04 +00:00
|
|
|
<name>sky-view</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>256</width>
|
|
|
|
<height>128</height>
|
|
|
|
<format>rgb16f</format>
|
|
|
|
<min-filter>linear</min-filter>
|
|
|
|
<mag-filter>linear</mag-filter>
|
|
|
|
<wrap-s>repeat</wrap-s>
|
|
|
|
<wrap-t>clamp-to-edge</wrap-t>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
|
|
|
<name>aerial-perspective</name>
|
2021-07-26 10:10:58 +00:00
|
|
|
<type>2d</type>
|
2021-07-31 16:50:18 +00:00
|
|
|
<width>1024</width>
|
2021-07-26 10:10:58 +00:00
|
|
|
<height>32</height>
|
|
|
|
<format>rgba16f</format>
|
|
|
|
<min-filter>linear</min-filter>
|
|
|
|
<mag-filter>linear</mag-filter>
|
|
|
|
<wrap-s>clamp-to-edge</wrap-s>
|
|
|
|
<wrap-t>clamp-to-edge</wrap-t>
|
2021-04-10 09:14:16 +00:00
|
|
|
</buffer>
|
|
|
|
|
|
|
|
<!-- Environment cubemap -->
|
|
|
|
<buffer>
|
|
|
|
<name>envmap</name>
|
|
|
|
<type>cubemap</type>
|
|
|
|
<width>128</width>
|
|
|
|
<height>128</height>
|
2021-07-24 05:04:39 +00:00
|
|
|
<format>rgb16f</format>
|
2021-04-10 09:14:16 +00:00
|
|
|
<min-filter>linear-mipmap-linear</min-filter>
|
|
|
|
<mag-filter>linear</mag-filter>
|
|
|
|
<wrap-s>clamp-to-edge</wrap-s>
|
|
|
|
<wrap-t>clamp-to-edge</wrap-t>
|
|
|
|
<mipmap-levels>5</mipmap-levels>
|
|
|
|
</buffer>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>
|
|
|
|
<name>prefiltered-envmap</name>
|
|
|
|
<type>cubemap</type>
|
|
|
|
<width>128</width>
|
|
|
|
<height>128</height>
|
|
|
|
<format>rgb16f</format>
|
|
|
|
<min-filter>linear-mipmap-linear</min-filter>
|
|
|
|
<mag-filter>linear</mag-filter>
|
|
|
|
<wrap-s>clamp-to-edge</wrap-s>
|
|
|
|
<wrap-t>clamp-to-edge</wrap-t>
|
|
|
|
<mipmap-levels>5</mipmap-levels>
|
|
|
|
</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
|
|
|
|
<!-- Shadow map atlas -->
|
|
|
|
<buffer>
|
|
|
|
<name>sun-shadowmap-atlas</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>8192</width>
|
|
|
|
<height>8192</height>
|
|
|
|
<format>depth16</format>
|
|
|
|
<wrap-s>clamp-to-border</wrap-s>
|
|
|
|
<wrap-t>clamp-to-border</wrap-t>
|
|
|
|
<min-filter>linear</min-filter>
|
|
|
|
<mag-filter>linear</mag-filter>
|
|
|
|
<border-color type="vec4d">1.0 1.0 1.0 1.0</border-color>
|
|
|
|
<shadow-comparison>true</shadow-comparison>
|
|
|
|
</buffer>
|
|
|
|
|
|
|
|
<!-- Average luminance -->
|
|
|
|
<buffer>
|
|
|
|
<name>luminance</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>1024</width>
|
|
|
|
<height>1024</height>
|
|
|
|
<format>r16f</format>
|
|
|
|
<min-filter>linear-mipmap-nearest</min-filter>
|
|
|
|
<mag-filter>nearest</mag-filter>
|
|
|
|
<mipmap-levels>10</mipmap-levels>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
|
|
|
<name>prev-luminance</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>1</width>
|
|
|
|
<height>1</height>
|
|
|
|
<format>r16f</format>
|
|
|
|
<min-filter>nearest</min-filter>
|
|
|
|
<mag-filter>nearest</mag-filter>
|
|
|
|
</buffer>
|
|
|
|
<buffer>
|
|
|
|
<name>adapted-luminance</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>1</width>
|
|
|
|
<height>1</height>
|
|
|
|
<format>r16f</format>
|
|
|
|
<min-filter>nearest</min-filter>
|
|
|
|
<mag-filter>nearest</mag-filter>
|
|
|
|
</buffer>
|
|
|
|
|
|
|
|
<!-- SSAO -->
|
|
|
|
<buffer>
|
|
|
|
<name>ao0</name>
|
|
|
|
<type>2d</type>
|
|
|
|
<width>screen</width>
|
|
|
|
<height>screen</height>
|
|
|
|
<screen-width-scale>0.5</screen-width-scale>
|
|
|
|
<screen-height-scale>0.5</screen-height-scale>
|
|
|
|
<format>r8</format>
|
|
|
|
</buffer>
|
|
|
|
|
|
|
|
<!-- Bloom buffers -->
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom0</name>
|
|
|
|
<screen-width-scale>0.5</screen-width-scale>
|
|
|
|
<screen-height-scale>0.5</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom1</name>
|
|
|
|
<screen-width-scale>0.25</screen-width-scale>
|
|
|
|
<screen-height-scale>0.25</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom2</name>
|
|
|
|
<screen-width-scale>0.125</screen-width-scale>
|
|
|
|
<screen-height-scale>0.125</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom3</name>
|
|
|
|
<screen-width-scale>0.0625</screen-width-scale>
|
|
|
|
<screen-height-scale>0.0625</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom0-tmp</name>
|
|
|
|
<screen-width-scale>0.5</screen-width-scale>
|
|
|
|
<screen-height-scale>0.5</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom1-tmp</name>
|
|
|
|
<screen-width-scale>0.25</screen-width-scale>
|
|
|
|
<screen-height-scale>0.25</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom2-tmp</name>
|
|
|
|
<screen-width-scale>0.125</screen-width-scale>
|
|
|
|
<screen-height-scale>0.125</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
<buffer include="bloom-buffer.xml">
|
|
|
|
<name>bloom3-tmp</name>
|
|
|
|
<screen-width-scale>0.0625</screen-width-scale>
|
|
|
|
<screen-height-scale>0.0625</screen-height-scale>
|
|
|
|
</buffer>
|
|
|
|
|
|
|
|
<!--=======================================================================-->
|
|
|
|
|
2021-07-28 07:40:04 +00:00
|
|
|
<!--
|
|
|
|
Generate the atmospheric scattering related LUTs
|
|
|
|
This is an implementation of Sébastien Hillaire's "A Scalable and
|
|
|
|
Production Ready Sky and Atmosphere Rendering Technique".
|
|
|
|
As a small summary, the sky-view and aerial perspective LUTs are used by
|
|
|
|
later passes to apply atmospheric scattering to the skydome and
|
|
|
|
opaque/transparent objects respectively. These two LUTs also rely on
|
|
|
|
another pair of LUTs (transmittance and multiple scattering) to speed up
|
|
|
|
the computations.
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>atmos-transmittance</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/atmos-transmittance</effect>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-07-28 07:40:04 +00:00
|
|
|
<buffer>transmittance</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass>
|
|
|
|
<name>atmos-multiple-scattering</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/atmos-multiple-scattering</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>transmittance</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-07-28 07:40:04 +00:00
|
|
|
<buffer>multiple-scattering</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
2021-07-26 10:10:58 +00:00
|
|
|
<pass>
|
|
|
|
<name>atmos-sky-view</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/atmos-sky-view</effect>
|
2021-07-28 07:40:04 +00:00
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>transmittance</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>multiple-scattering</buffer>
|
|
|
|
</binding>
|
2021-07-26 10:10:58 +00:00
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-07-26 10:10:58 +00:00
|
|
|
<buffer>sky-view</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass>
|
|
|
|
<name>atmos-aerial-perspective</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/atmos-aerial-perspective</effect>
|
2021-07-28 07:40:04 +00:00
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>transmittance</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>multiple-scattering</buffer>
|
|
|
|
</binding>
|
2021-07-26 10:10:58 +00:00
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-07-28 07:40:04 +00:00
|
|
|
<buffer>aerial-perspective</buffer>
|
2021-07-26 10:10:58 +00:00
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
2021-04-10 09:14:16 +00:00
|
|
|
<!--
|
|
|
|
Environment capture passes
|
|
|
|
Render to a cubemap using forward rendering. Only render the skydome and
|
|
|
|
very bare terrain since we want to make as little draw calls as possible.
|
|
|
|
We also want to avoid doing an OSG cull traversal on many nodes as our
|
|
|
|
scene graph structure isn't too well optimized.
|
|
|
|
-->
|
|
|
|
<pass include="env-capture-pass.xml">
|
|
|
|
<name>env-capture0</name>
|
|
|
|
<cubemap-face>0</cubemap-face>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>envmap</buffer>
|
|
|
|
<face>0</face>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="env-capture-pass.xml">
|
|
|
|
<name>env-capture1</name>
|
|
|
|
<cubemap-face>1</cubemap-face>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>envmap</buffer>
|
|
|
|
<face>1</face>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="env-capture-pass.xml">
|
|
|
|
<name>env-capture2</name>
|
|
|
|
<cubemap-face>2</cubemap-face>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>envmap</buffer>
|
|
|
|
<face>2</face>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="env-capture-pass.xml">
|
|
|
|
<name>env-capture3</name>
|
|
|
|
<cubemap-face>3</cubemap-face>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>envmap</buffer>
|
|
|
|
<face>3</face>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="env-capture-pass.xml">
|
|
|
|
<name>env-capture4</name>
|
|
|
|
<cubemap-face>4</cubemap-face>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>envmap</buffer>
|
|
|
|
<face>4</face>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="env-capture-pass.xml">
|
|
|
|
<name>env-capture5</name>
|
|
|
|
<cubemap-face>5</cubemap-face>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>envmap</buffer>
|
|
|
|
<face>5</face>
|
2021-07-31 12:36:02 +00:00
|
|
|
<!-- Generate the mips after writing to the last face -->
|
|
|
|
<mipmap-generation>true</mipmap-generation>
|
2021-04-10 09:14:16 +00:00
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Pre-filter the environment map
|
|
|
|
We convolve the cubemap for five roughness values and store the results
|
|
|
|
on the mipmap levels of the cubemap. Later passes will choose which mipmap
|
|
|
|
level to use for reflections based on the roughness of the surface that's
|
2021-07-31 12:36:02 +00:00
|
|
|
being lighted/rendered. The first mipmap level can just be copied from the
|
|
|
|
original envmap as we'd like it to contain perfect mirror reflections.
|
2021-04-10 09:14:16 +00:00
|
|
|
Diffuse lighting is approximated by using the highest mipmap level
|
|
|
|
(roughness=1).
|
|
|
|
-->
|
2021-07-31 12:36:02 +00:00
|
|
|
<pass include="env-prefilter-pass.xml">
|
|
|
|
<name>env-prefilter0</name>
|
|
|
|
<effect>Effects/HDR/envmap-copy</effect>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>prefiltered-envmap</buffer>
|
|
|
|
<face>0</face>
|
|
|
|
<level>0</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>color1</component>
|
|
|
|
<buffer>prefiltered-envmap</buffer>
|
|
|
|
<face>1</face>
|
|
|
|
<level>0</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>color2</component>
|
|
|
|
<buffer>prefiltered-envmap</buffer>
|
|
|
|
<face>2</face>
|
|
|
|
<level>0</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>color3</component>
|
|
|
|
<buffer>prefiltered-envmap</buffer>
|
|
|
|
<face>3</face>
|
|
|
|
<level>0</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>color4</component>
|
|
|
|
<buffer>prefiltered-envmap</buffer>
|
|
|
|
<face>4</face>
|
|
|
|
<level>0</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>color5</component>
|
|
|
|
<buffer>prefiltered-envmap</buffer>
|
|
|
|
<face>5</face>
|
|
|
|
<level>0</level>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
2021-07-26 15:12:49 +00:00
|
|
|
<pass include="env-prefilter-pass.xml">
|
|
|
|
<name>env-prefilter1</name>
|
|
|
|
<effect>Effects/HDR/envmap-prefilter1</effect>
|
2021-04-10 09:14:16 +00:00
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>0</face>
|
|
|
|
<level>1</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color1</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>1</face>
|
|
|
|
<level>1</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color2</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>2</face>
|
|
|
|
<level>1</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color3</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>3</face>
|
|
|
|
<level>1</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color4</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>4</face>
|
|
|
|
<level>1</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color5</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>5</face>
|
|
|
|
<level>1</level>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
2021-07-26 15:12:49 +00:00
|
|
|
<pass include="env-prefilter-pass.xml">
|
|
|
|
<name>env-prefilter2</name>
|
|
|
|
<effect>Effects/HDR/envmap-prefilter2</effect>
|
2021-04-10 09:14:16 +00:00
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>0</face>
|
|
|
|
<level>2</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color1</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>1</face>
|
|
|
|
<level>2</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color2</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>2</face>
|
|
|
|
<level>2</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color3</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>3</face>
|
|
|
|
<level>2</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color4</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>4</face>
|
|
|
|
<level>2</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color5</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>5</face>
|
|
|
|
<level>2</level>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
2021-07-26 15:12:49 +00:00
|
|
|
<pass include="env-prefilter-pass.xml">
|
|
|
|
<name>env-prefilter3</name>
|
|
|
|
<effect>Effects/HDR/envmap-prefilter3</effect>
|
2021-04-10 09:14:16 +00:00
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>0</face>
|
|
|
|
<level>3</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color1</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>1</face>
|
|
|
|
<level>3</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color2</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>2</face>
|
|
|
|
<level>3</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color3</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>3</face>
|
|
|
|
<level>3</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color4</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>4</face>
|
|
|
|
<level>3</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color5</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>5</face>
|
|
|
|
<level>3</level>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
2021-07-26 15:12:49 +00:00
|
|
|
<pass include="env-prefilter-pass.xml">
|
|
|
|
<name>env-prefilter4</name>
|
|
|
|
<effect>Effects/HDR/envmap-prefilter4</effect>
|
2021-04-10 09:14:16 +00:00
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>0</face>
|
|
|
|
<level>4</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color1</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>1</face>
|
|
|
|
<level>4</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color2</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>2</face>
|
|
|
|
<level>4</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color3</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>3</face>
|
|
|
|
<level>4</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color4</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>4</face>
|
|
|
|
<level>4</level>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
2021-07-26 15:12:49 +00:00
|
|
|
<component>color5</component>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
<face>5</face>
|
|
|
|
<level>4</level>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
G-Buffer pass
|
|
|
|
This is the main forward pass. Here we skip the rendering of transparent
|
|
|
|
objects and other geometry that should be forward rendered later (like the
|
|
|
|
skydome, clouds, etc.)
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>geometry</name>
|
|
|
|
<type>scene</type>
|
|
|
|
<effect-scheme>hdr-geometry</effect-scheme>
|
2021-07-26 14:20:25 +00:00
|
|
|
<clear-mask>depth</clear-mask>
|
2021-04-10 09:14:16 +00:00
|
|
|
<cull-mask>0xfffff7ff</cull-mask>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>gbuffer0</buffer>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>color1</component>
|
|
|
|
<buffer>gbuffer1</buffer>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>color2</component>
|
|
|
|
<buffer>gbuffer2</buffer>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>depth</component>
|
|
|
|
<buffer>depth</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!-- Shadow mapping pre-passes -->
|
|
|
|
<pass include="csm-pass.xml">
|
|
|
|
<name>csm0</name>
|
|
|
|
<near-m>0.1</near-m>
|
|
|
|
<far-m>3.0</far-m>
|
|
|
|
<viewport>
|
|
|
|
<x>0.0</x>
|
|
|
|
<y>0.0</y>
|
|
|
|
<width>0.5</width>
|
|
|
|
<height>0.5</height>
|
|
|
|
</viewport>
|
|
|
|
</pass>
|
|
|
|
<pass include="csm-pass.xml">
|
|
|
|
<name>csm1</name>
|
|
|
|
<near-m>3.0</near-m>
|
|
|
|
<far-m>70.0</far-m>
|
|
|
|
<viewport>
|
|
|
|
<x>0.5</x>
|
|
|
|
<y>0.0</y>
|
|
|
|
<width>0.5</width>
|
|
|
|
<height>0.5</height>
|
|
|
|
</viewport>
|
|
|
|
</pass>
|
|
|
|
<pass include="csm-pass.xml">
|
|
|
|
<name>csm2</name>
|
|
|
|
<near-m>70.0</near-m>
|
|
|
|
<far-m>300.0</far-m>
|
|
|
|
<viewport>
|
|
|
|
<x>0.0</x>
|
|
|
|
<y>0.5</y>
|
|
|
|
<width>0.5</width>
|
|
|
|
<height>0.5</height>
|
|
|
|
</viewport>
|
|
|
|
</pass>
|
|
|
|
<pass include="csm-pass.xml">
|
|
|
|
<name>csm3</name>
|
|
|
|
<near-m>300.0</near-m>
|
|
|
|
<far-m>1000.0</far-m>
|
|
|
|
<viewport>
|
|
|
|
<x>0.5</x>
|
|
|
|
<y>0.5</y>
|
|
|
|
<width>0.5</width>
|
|
|
|
<height>0.5</height>
|
|
|
|
</viewport>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!-- SSAO (Screen Space Ambient Occlusion) -->
|
|
|
|
<pass>
|
|
|
|
<name>ao</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/ao</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>depth</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>gbuffer1</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>ao0</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Main lighting pass
|
|
|
|
Combine the G-Buffer and other buffers to compute the final shading value
|
|
|
|
of the pixel in HDR.
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>lighting</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/lighting</effect>
|
|
|
|
<use-shadow-pass>csm0</use-shadow-pass>
|
|
|
|
<use-shadow-pass>csm1</use-shadow-pass>
|
|
|
|
<use-shadow-pass>csm2</use-shadow-pass>
|
|
|
|
<use-shadow-pass>csm3</use-shadow-pass>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>gbuffer0</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>gbuffer1</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>2</unit>
|
|
|
|
<buffer>gbuffer2</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>3</unit>
|
|
|
|
<buffer>depth</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>8</unit>
|
|
|
|
<buffer>ao0</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>9</unit>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>10</unit>
|
|
|
|
<buffer>sun-shadowmap-atlas</buffer>
|
|
|
|
</binding>
|
2021-07-26 10:10:58 +00:00
|
|
|
<binding>
|
|
|
|
<unit>11</unit>
|
2021-07-28 07:40:04 +00:00
|
|
|
<buffer>aerial-perspective</buffer>
|
2021-07-26 10:10:58 +00:00
|
|
|
</binding>
|
2021-07-30 19:34:57 +00:00
|
|
|
<binding>
|
|
|
|
<unit>12</unit>
|
|
|
|
<buffer>transmittance</buffer>
|
|
|
|
</binding>
|
2021-04-10 09:14:16 +00:00
|
|
|
<attachment>
|
|
|
|
<component>color0</component>
|
|
|
|
<buffer>hdr-result</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Forward pass
|
|
|
|
Render all objects that couldn't be rendered on the G-Buffer, mainly
|
|
|
|
transparent objects. This is also done in HDR.
|
|
|
|
We reuse the depth buffer from the G-Buffer stage so we can take advantage
|
|
|
|
of early depth testing.
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>forward</name>
|
|
|
|
<type>scene</type>
|
|
|
|
<effect-scheme>hdr-forward</effect-scheme>
|
|
|
|
<binding>
|
|
|
|
<unit>9</unit>
|
2021-07-31 12:36:02 +00:00
|
|
|
<buffer>prefiltered-envmap</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
</binding>
|
2021-07-26 10:10:58 +00:00
|
|
|
<binding>
|
|
|
|
<unit>11</unit>
|
|
|
|
<buffer>sky-view</buffer>
|
|
|
|
</binding>
|
2021-07-28 07:40:04 +00:00
|
|
|
<binding>
|
|
|
|
<unit>13</unit>
|
|
|
|
<buffer>transmittance</buffer>
|
|
|
|
</binding>
|
2021-04-10 09:14:16 +00:00
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>hdr-result</buffer>
|
|
|
|
</attachment>
|
|
|
|
<attachment>
|
|
|
|
<component>depth</component>
|
|
|
|
<buffer>depth</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Average luminance calculation
|
|
|
|
1. Convert the RGB values to luminance values and store them on a fixed
|
|
|
|
size texture.
|
|
|
|
2. Generate mipmaps for this texture until we are left with a 1x1 texture
|
|
|
|
at the highest mipmap level. This downsampling process effectively
|
|
|
|
calculates the geometric mean of luminance.
|
|
|
|
3. Simulate eye adaptation by smoothing out the transition between
|
|
|
|
different exposures.
|
|
|
|
4. Update the previous frame average luminance value for next frame.
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>luminance</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/luminance</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
2021-07-26 10:10:58 +00:00
|
|
|
<buffer>hdr-result</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>luminance</buffer>
|
|
|
|
<mipmap-generation>true</mipmap-generation>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass>
|
|
|
|
<name>adapt-luminance</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/adapt-luminance</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>prev-luminance</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>luminance</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>adapted-luminance</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass>
|
|
|
|
<name>copy-prev-luminance</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/copy-prev-luminance</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>adapted-luminance</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>prev-luminance</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Generate a threshold texture for bloom
|
|
|
|
The HDR lighting buffer is filtered so we are left with an image that only
|
|
|
|
contains the brightest spots. This image is then progressively
|
|
|
|
downscaled, blurred and upscaled until we are left with the final bloom
|
|
|
|
to be applied.
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>bloom-threshold</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/bloom-threshold</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
2021-07-26 10:10:58 +00:00
|
|
|
<buffer>hdr-result</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>adapted-luminance</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom0</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<pass include="bloom-copy-pass.xml">
|
|
|
|
<name>bloom-copy1</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom0</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom1</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="bloom-copy-pass.xml">
|
|
|
|
<name>bloom-copy2</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom1</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom2</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="bloom-copy-pass.xml">
|
|
|
|
<name>bloom-copy3</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom2</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom3</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<pass include="bloom-horizontal-blur-pass.xml">
|
|
|
|
<name>bloom-hblur3</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom3</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom3-tmp</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="bloom-vertical-blur-pass.xml">
|
|
|
|
<name>bloom-vblur3</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom3-tmp</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom3</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<pass include="bloom-horizontal-blur-pass.xml">
|
|
|
|
<name>bloom-hblur2</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom2</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>bloom3</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom2-tmp</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="bloom-vertical-blur-pass.xml">
|
|
|
|
<name>bloom-vblur2</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom2-tmp</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom2</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<pass include="bloom-horizontal-blur-pass.xml">
|
|
|
|
<name>bloom-hblur1</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom1</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>bloom2</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom1-tmp</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="bloom-vertical-blur-pass.xml">
|
|
|
|
<name>bloom-vblur1</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom1-tmp</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom1</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<pass include="bloom-horizontal-blur-pass.xml">
|
|
|
|
<name>bloom-hblur0</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom0</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>bloom1</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom0-tmp</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
<pass include="bloom-vertical-blur-pass.xml">
|
|
|
|
<name>bloom-vblur0</name>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>bloom0-tmp</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>bloom0</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Post-processing
|
|
|
|
Perform miscellaneous post-processing operations, namely tonemapping
|
|
|
|
and exposure compensation. This process converts the HDR buffer into an
|
|
|
|
LDR texture ready to be displayed on a screen.
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>post</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/postprocess</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
2021-07-26 10:10:58 +00:00
|
|
|
<buffer>hdr-result</buffer>
|
2021-04-10 09:14:16 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>1</unit>
|
|
|
|
<buffer>adapted-luminance</buffer>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<unit>4</unit>
|
|
|
|
<buffer>bloom0</buffer>
|
|
|
|
</binding>
|
|
|
|
<attachment>
|
2021-07-29 06:45:17 +00:00
|
|
|
<component>color0</component>
|
2021-04-10 09:14:16 +00:00
|
|
|
<buffer>final</buffer>
|
|
|
|
</attachment>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Final display pass
|
|
|
|
Perform any post-processing that has to be done in LDR space.
|
|
|
|
-->
|
|
|
|
<pass>
|
|
|
|
<name>display</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/display</effect>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>final</buffer>
|
|
|
|
</binding>
|
|
|
|
</pass>
|
|
|
|
|
|
|
|
<!-- DEBUG PASSES -->
|
|
|
|
<!--
|
|
|
|
<pass>
|
|
|
|
<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>
|
|
|
|
<width>0.2</width>
|
|
|
|
<height>0.2</height>
|
|
|
|
</geometry>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>gbuffer0</buffer>
|
|
|
|
</binding>
|
|
|
|
</pass>
|
|
|
|
<pass>
|
|
|
|
<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>
|
|
|
|
<width>0.2</width>
|
|
|
|
<height>0.2</height>
|
|
|
|
</geometry>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>gbuffer1</buffer>
|
|
|
|
</binding>
|
|
|
|
</pass>
|
|
|
|
<pass>
|
|
|
|
<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>
|
|
|
|
<width>0.2</width>
|
|
|
|
<height>0.2</height>
|
|
|
|
</geometry>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>gbuffer2</buffer>
|
|
|
|
</binding>
|
|
|
|
</pass>
|
|
|
|
<pass>
|
|
|
|
<name>debug-depth</name>
|
|
|
|
<type>quad</type>
|
|
|
|
<effect>Effects/HDR/trivial</effect>
|
|
|
|
<clear-mask>depth</clear-mask>
|
|
|
|
<geometry>
|
|
|
|
<left>0.8</left>
|
|
|
|
<bottom>0.8</bottom>
|
|
|
|
<width>0.2</width>
|
|
|
|
<height>0.2</height>
|
|
|
|
</geometry>
|
|
|
|
<binding>
|
|
|
|
<unit>0</unit>
|
|
|
|
<buffer>depth</buffer>
|
|
|
|
</binding>
|
|
|
|
</pass>
|
|
|
|
-->
|
|
|
|
</PropertyList>
|