diff --git a/servers/rendering/renderer_rd/environment/fog.cpp b/servers/rendering/renderer_rd/environment/fog.cpp index a836776bbbd..b2f4f085ac5 100644 --- a/servers/rendering/renderer_rd/environment/fog.cpp +++ b/servers/rendering/renderer_rd/environment/fog.cpp @@ -561,7 +561,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P if (p_cam_projection.is_orthogonal()) { fog_near_size = fog_far_size; } else { - fog_near_size = Vector2(); + fog_near_size = frustum_near_size.max(Vector2(0.001, 0.001)); } params.fog_frustum_size_begin[0] = fog_near_size.x; @@ -1020,7 +1020,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P if (p_cam_projection.is_orthogonal()) { fog_near_size = fog_far_size; } else { - fog_near_size = Vector2(); + fog_near_size = frustum_near_size.max(Vector2(0.001, 0.001)); } params.fog_frustum_size_begin[0] = fog_near_size.x;