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

(cherry picked from commit 2343d36b4352ff1c177e611e71df7df6129e993f)
This commit is contained in:
Clay John
2026-02-09 09:45:12 -08:00
committed by Thaddeus Crews
parent f4e9a0c426
commit 0591470c36

View File

@@ -1079,7 +1079,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);
}