Use transmittance instead of opacity in the early-out branch when calculating volumetric fog

This commit is contained in:
Clay John 2026-02-09 09:45:12 -08:00
parent 56f3e2611d
commit 2343d36b43

View file

@ -1091,7 +1091,7 @@ layout(location = 2) out vec2 motion_vector;
vec4 volumetric_fog_process(vec2 screen_uv, float z) {
vec3 fog_pos = vec3(screen_uv, z * implementation_data.volumetric_fog_inv_length);
if (fog_pos.z < 0.0) {
return vec4(0.0);
return vec4(0.0, 0.0, 0.0, 1.0);
} else if (fog_pos.z < 1.0) {
fog_pos.z = pow(fog_pos.z, implementation_data.volumetric_fog_detail_spread);
}