diff options
Diffstat (limited to 'scene/resources/environment.h')
-rw-r--r-- | scene/resources/environment.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scene/resources/environment.h b/scene/resources/environment.h index b01c328b50..68b49f38d7 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -75,6 +75,11 @@ public: SDFGI_Y_SCALE_100_PERCENT, }; + enum FogMode { + FOG_MODE_EXPONENTIAL, + FOG_MODE_DEPTH, + }; + enum GlowBlendMode { GLOW_BLEND_MODE_ADDITIVE, GLOW_BLEND_MODE_SCREEN, @@ -172,6 +177,7 @@ private: // Fog bool fog_enabled = false; + FogMode fog_mode = FOG_MODE_EXPONENTIAL; Color fog_light_color = Color(0.518, 0.553, 0.608); float fog_light_energy = 1.0; float fog_sun_scatter = 0.0; @@ -183,6 +189,13 @@ private: void _update_fog(); + // Depth Fog + float fog_depth_curve = 1.0; + float fog_depth_begin = 10.0; + float fog_depth_end = 100.0; + + void _update_fog_depth(); + // Volumetric Fog bool volumetric_fog_enabled = false; float volumetric_fog_density = 0.05; @@ -361,6 +374,8 @@ public: void set_fog_enabled(bool p_enabled); bool is_fog_enabled() const; + void set_fog_mode(FogMode p_mode); + FogMode get_fog_mode() const; void set_fog_light_color(const Color &p_light_color); Color get_fog_light_color() const; void set_fog_light_energy(float p_amount); @@ -379,6 +394,14 @@ public: void set_fog_sky_affect(float p_sky_affect); float get_fog_sky_affect() const; + // Depth Fog + void set_fog_depth_curve(float p_curve); + float get_fog_depth_curve() const; + void set_fog_depth_begin(float p_begin); + float get_fog_depth_begin() const; + void set_fog_depth_end(float p_end); + float get_fog_depth_end() const; + // Volumetric Fog void set_volumetric_fog_enabled(bool p_enable); bool is_volumetric_fog_enabled() const; @@ -429,5 +452,6 @@ VARIANT_ENUM_CAST(Environment::ReflectionSource) VARIANT_ENUM_CAST(Environment::ToneMapper) VARIANT_ENUM_CAST(Environment::SDFGIYScale) VARIANT_ENUM_CAST(Environment::GlowBlendMode) +VARIANT_ENUM_CAST(Environment::FogMode) #endif // ENVIRONMENT_H |