1
0
Fork 0

Volumetric clouds stuff load but broken

Signed-off-by: fly <merspieler@alwaysdata.com>
This commit is contained in:
fly 2023-11-11 22:35:45 +01:00
parent 84f4ed4407
commit a592bc8f19
5 changed files with 55 additions and 11 deletions

View file

@ -29,6 +29,21 @@
</condition>
</buffer>
<buffer>
<name>color</name>
<type>2d</type>
<width>screen</width>
<height>screen</height>
<format>rgba8</format>
</buffer>
<buffer>
<name>final</name>
<type>2d</type>
<width>screen</width>
<height>screen</height>
<format>rgba8</format>
</buffer>
<pass n="0" include="csm-pass.xml">
<name>csm0</name>
<near-m>0.1</near-m>
@ -86,4 +101,28 @@
<clear-mask>depth</clear-mask>
<z-far>100.0</z-far>
</pass>
<pass>
<name>volumetric-clouds</name>
<type>quad</type>
<effect>Compositor/Effects/ALS/volumetric-clouds</effect>
<binding>
<buffer>color</buffer>
<unit>0</unit>
</binding>
<attachment>
<buffer>final</buffer>
<component>color0</component>
</attachment>
</pass>
<pass>
<name>display</name>
<type>quad</type>
<binding>
<buffer>final</buffer>
<unit>0</unit>
</binding>
</pass>
</PropertyList>

View file

@ -24,4 +24,9 @@
<property>/sim/rendering/shadows/enabled</property>
</condition>
</binding>
<attachment>
<buffer>color</buffer>
<component>color0</component>
</attachment>
</PropertyList>

View file

@ -4,7 +4,7 @@
<technique n="1">
<pass>
<program>
<vertex-shader>Shaders/ALS/fullscreen.vert</vertex-shader>
<vertex-shader>Compositor/Shaders/ALS/fullscreen.vert</vertex-shader>
<fragment-shader>Shaders/ALS/postprocess.frag</fragment-shader>
</program>
<uniform>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>Effects/ALS/volumetric-clouds</name>
<name>Compositor/Effects/ALS/volumetric-clouds</name>
<parameters>
<texture n="5">
<image>Textures/Sky/vol_cloud_base.png</image>
@ -89,10 +89,10 @@
</internal-format>
</texture-unit>
<program>
<vertex-shader>Shaders/ALS/fullscreen.vert</vertex-shader>
<fragment-shader>Shaders/ALS/volumetric-clouds.frag</fragment-shader>
<fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
<fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
<vertex-shader>Compositor/Shaders/ALS/fullscreen.vert</vertex-shader>
<fragment-shader>Shaders/volumetric-clouds.frag</fragment-shader>
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/hazes.frag</fragment-shader>
</program>
<uniform>
<name>prevframe_tex</name>

View file

@ -380,11 +380,11 @@ vec4 getCloudColor(vec3 rd)
return rayMarch(entry, rd, depth, fragWorldPos);
}
const unsigned int bayerMatrix4[16] = unsigned int[](
0, 8, 2, 10,
12, 4, 14, 6,
3, 11, 1, 9,
15, 7, 13, 5
const uint bayerMatrix4[16] = uint[](
0u, 8u, 2u, 10u,
12u, 4u, 14u, 6u,
3u, 11u, 1u, 9u,
15u, 7u, 13u, 5u
);
void main()