Merge pull request #116107 from clayjohn/volumetric-fog-early-out

Use transmittance instead of opacity in the early-out branch when calculating volumetric fog
This commit is contained in:
Thaddeus Crews 2026-02-10 08:29:42 -06:00
commit 0dc5c0ad36
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

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);
}