summaryrefslogtreecommitdiff
path: root/scene/resources/environment.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/environment.h')
-rw-r--r--scene/resources/environment.h55
1 files changed, 37 insertions, 18 deletions
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 024bef34de..b71fe8904a 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,7 +34,6 @@
#include "core/io/resource.h"
#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
-#include "servers/rendering_server.h"
class Environment : public Resource {
GDCLASS(Environment, Resource);
@@ -70,16 +69,10 @@ public:
TONE_MAPPER_ACES,
};
- enum SDFGICascades {
- SDFGI_CASCADES_4,
- SDFGI_CASCADES_6,
- SDFGI_CASCADES_8,
- };
-
enum SDFGIYScale {
- SDFGI_Y_SCALE_DISABLED,
- SDFGI_Y_SCALE_75_PERCENT,
SDFGI_Y_SCALE_50_PERCENT,
+ SDFGI_Y_SCALE_75_PERCENT,
+ SDFGI_Y_SCALE_100_PERCENT,
};
enum GlowBlendMode {
@@ -142,14 +135,23 @@ private:
float ssao_ao_channel_affect = 0.0;
void _update_ssao();
+ // SSIL
+ bool ssil_enabled = false;
+ float ssil_radius = 5.0;
+ float ssil_intensity = 1.0;
+ float ssil_sharpness = 0.98;
+ float ssil_normal_rejection = 1.0;
+
+ void _update_ssil();
+
// SDFGI
bool sdfgi_enabled = false;
- SDFGICascades sdfgi_cascades = SDFGI_CASCADES_6;
+ int sdfgi_cascades = 4;
float sdfgi_min_cell_size = 0.2;
- SDFGIYScale sdfgi_y_scale = SDFGI_Y_SCALE_DISABLED;
+ SDFGIYScale sdfgi_y_scale = SDFGI_Y_SCALE_75_PERCENT;
bool sdfgi_use_occlusion = false;
- float sdfgi_bounce_feedback = 0.0;
- bool sdfgi_read_sky_light = false;
+ float sdfgi_bounce_feedback = 0.5;
+ bool sdfgi_read_sky_light = true;
float sdfgi_energy = 1.0;
float sdfgi_normal_bias = 1.1;
float sdfgi_probe_bias = 1.1;
@@ -167,6 +169,8 @@ private:
float glow_hdr_bleed_threshold = 1.0;
float glow_hdr_bleed_scale = 2.0;
float glow_hdr_luminance_cap = 12.0;
+ float glow_map_strength = 0.8f;
+ Ref<Texture> glow_map;
void _update_glow();
// Fog
@@ -296,11 +300,23 @@ public:
void set_ssao_ao_channel_affect(float p_ao_channel_affect);
float get_ssao_ao_channel_affect() const;
+ // SSIL
+ void set_ssil_enabled(bool p_enabled);
+ bool is_ssil_enabled() const;
+ void set_ssil_radius(float p_radius);
+ float get_ssil_radius() const;
+ void set_ssil_intensity(float p_intensity);
+ float get_ssil_intensity() const;
+ void set_ssil_sharpness(float p_sharpness);
+ float get_ssil_sharpness() const;
+ void set_ssil_normal_rejection(float p_normal_rejection);
+ float get_ssil_normal_rejection() const;
+
// SDFGI
void set_sdfgi_enabled(bool p_enabled);
bool is_sdfgi_enabled() const;
- void set_sdfgi_cascades(SDFGICascades p_cascades);
- SDFGICascades get_sdfgi_cascades() const;
+ void set_sdfgi_cascades(int p_cascades);
+ int get_sdfgi_cascades() const;
void set_sdfgi_min_cell_size(float p_size);
float get_sdfgi_min_cell_size() const;
void set_sdfgi_max_distance(float p_distance);
@@ -345,6 +361,10 @@ public:
float get_glow_hdr_bleed_scale() const;
void set_glow_hdr_luminance_cap(float p_amount);
float get_glow_hdr_luminance_cap() const;
+ void set_glow_map_strength(float p_strength);
+ float get_glow_map_strength() const;
+ void set_glow_map(Ref<Texture> p_glow_map);
+ Ref<Texture> get_glow_map() const;
// Fog
@@ -412,7 +432,6 @@ VARIANT_ENUM_CAST(Environment::BGMode)
VARIANT_ENUM_CAST(Environment::AmbientSource)
VARIANT_ENUM_CAST(Environment::ReflectionSource)
VARIANT_ENUM_CAST(Environment::ToneMapper)
-VARIANT_ENUM_CAST(Environment::SDFGICascades)
VARIANT_ENUM_CAST(Environment::SDFGIYScale)
VARIANT_ENUM_CAST(Environment::GlowBlendMode)