We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb3af5a commit 44a639fCopy full SHA for 44a639f
servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
@@ -1449,13 +1449,10 @@ void fragment_shader(in SceneData scene_data) {
1449
float sa = 1.0 - volumetric_fog.a;
1450
res.a = fog.a * sa + volumetric_fog.a;
1451
if (res.a > 0.0) {
1452
- res.rgb = (fog.rgb * fog.a * sa + volumetric_fog.rgb) / res.a;
+ res.rgb = (fog.rgb * fog.a * sa + volumetric_fog.rgb * volumetric_fog.a) / res.a;
1453
}
1454
} else {
1455
- res.a = volumetric_fog.a;
1456
- if (res.a > 0.0) {
1457
- res.rgb = volumetric_fog.rgb / res.a;
1458
- }
+ res = volumetric_fog;
1459
1460
fog = res;
1461
0 commit comments