From 6aebc7b66efe9cfd562f702b86f0fac070ee2ec2 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 12 Oct 2022 19:56:03 +0200 Subject: Fix volumetric fog not rendering at densities lower than or equal to 0.001 This allows volumetric fog to render with the lowest density that can be specified in the inspector (0.0001). --- .../renderer_rd/shaders/environment/volumetric_fog_process.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/rendering/renderer_rd/shaders') diff --git a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl index eed9038502..28507e6c12 100644 --- a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl +++ b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl @@ -381,7 +381,7 @@ void main() { float cell_depth_size = abs(view_pos.z - get_depth_at_pos(fog_cell_size.z, pos.z + 1)); //compute directional lights - if (total_density > 0.001) { + if (total_density > 0.00005) { for (uint i = 0; i < params.directional_light_count; i++) { if (directional_lights.data[i].volumetric_fog_energy > 0.001) { vec3 shadow_attenuation = vec3(1.0); -- cgit v1.2.3