summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-10-12 19:56:03 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-10-13 00:45:49 +0200
commit6aebc7b66efe9cfd562f702b86f0fac070ee2ec2 (patch)
tree6b5256c2e7c4ea95b63337b1c99d7ece9db40e79 /servers
parentea47e03b360d0aeee10c1f7ef798f5750c2b1aa8 (diff)
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).
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl2
1 files changed, 1 insertions, 1 deletions
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);