From 8faf23b52b0147eea6903e84973893802d97d339 Mon Sep 17 00:00:00 2001 From: reduz Date: Sat, 6 Feb 2021 11:51:56 -0300 Subject: Simplify Volumetric Fog -Always use temporal reproject, it just loos way better than any other filter. -By always using termporal reproject, the shadowmap reduction can be done away with, massively improving performance. -Disadvantage of temporal reproject is update latency so.. -Made sure a gaussian filter runs in XY after fog, this allows to keep stability and lower latency. --- servers/rendering_server.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'servers/rendering_server.h') diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 5c59aa5ea1..5defa1f667 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -1025,18 +1025,9 @@ public: virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) = 0; - enum EnvVolumetricFogShadowFilter { - ENV_VOLUMETRIC_FOG_SHADOW_FILTER_DISABLED, - ENV_VOLUMETRIC_FOG_SHADOW_FILTER_LOW, - ENV_VOLUMETRIC_FOG_SHADOW_FILTER_MEDIUM, - ENV_VOLUMETRIC_FOG_SHADOW_FILTER_HIGH, - }; - - virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, EnvVolumetricFogShadowFilter p_shadow_filter, bool p_temporal_reprojection, float p_temporal_reprojection_amount) = 0; + virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount) = 0; virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) = 0; virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0; - virtual void environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size) = 0; - virtual void environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size) = 0; virtual Ref environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) = 0; -- cgit v1.2.3