|
@@ -278,6 +278,11 @@ float RendererEnvironmentStorage::environment_get_fog_sky_affect(RID p_env) cons
|
|
|
void RendererEnvironmentStorage::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject, float p_sky_affect) {
|
|
|
Environment *env = environment_owner.get_or_null(p_env);
|
|
|
ERR_FAIL_COND(!env);
|
|
|
+#ifdef DEBUG_ENABLED
|
|
|
+ if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) {
|
|
|
+ WARN_PRINT_ONCE_ED("Volumetric fog can only be enabled when using the Forward+ rendering backend.");
|
|
|
+ }
|
|
|
+#endif
|
|
|
env->volumetric_fog_enabled = p_enable;
|
|
|
env->volumetric_fog_density = p_density;
|
|
|
env->volumetric_fog_scattering = p_albedo;
|
|
@@ -377,6 +382,11 @@ void RendererEnvironmentStorage::environment_set_glow(RID p_env, bool p_enable,
|
|
|
Environment *env = environment_owner.get_or_null(p_env);
|
|
|
ERR_FAIL_COND(!env);
|
|
|
ERR_FAIL_COND_MSG(p_levels.size() != 7, "Size of array of glow levels must be 7");
|
|
|
+#ifdef DEBUG_ENABLED
|
|
|
+ if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" && p_enable) {
|
|
|
+ WARN_PRINT_ONCE_ED("Glow is not supported when using the GL Compatibility backend yet. Support will be added in a future release.");
|
|
|
+ }
|
|
|
+#endif
|
|
|
env->glow_enabled = p_enable;
|
|
|
env->glow_levels = p_levels;
|
|
|
env->glow_intensity = p_intensity;
|
|
@@ -468,6 +478,11 @@ RID RendererEnvironmentStorage::environment_get_glow_map(RID p_env) const {
|
|
|
void RendererEnvironmentStorage::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
|
|
|
Environment *env = environment_owner.get_or_null(p_env);
|
|
|
ERR_FAIL_COND(!env);
|
|
|
+#ifdef DEBUG_ENABLED
|
|
|
+ if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) {
|
|
|
+ WARN_PRINT_ONCE_ED("Screen-space reflections (SSR) can only be enabled when using the Forward+ rendering backend.");
|
|
|
+ }
|
|
|
+#endif
|
|
|
env->ssr_enabled = p_enable;
|
|
|
env->ssr_max_steps = p_max_steps;
|
|
|
env->ssr_fade_in = p_fade_int;
|
|
@@ -510,6 +525,11 @@ float RendererEnvironmentStorage::environment_get_ssr_depth_tolerance(RID p_env)
|
|
|
void RendererEnvironmentStorage::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) {
|
|
|
Environment *env = environment_owner.get_or_null(p_env);
|
|
|
ERR_FAIL_COND(!env);
|
|
|
+#ifdef DEBUG_ENABLED
|
|
|
+ if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) {
|
|
|
+ WARN_PRINT_ONCE_ED("Screen-space ambient occlusion (SSAO) can only be enabled when using the Forward+ rendering backend.");
|
|
|
+ }
|
|
|
+#endif
|
|
|
env->ssao_enabled = p_enable;
|
|
|
env->ssao_radius = p_radius;
|
|
|
env->ssao_intensity = p_intensity;
|
|
@@ -580,6 +600,11 @@ float RendererEnvironmentStorage::environment_get_ssao_ao_channel_affect(RID p_e
|
|
|
void RendererEnvironmentStorage::environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) {
|
|
|
Environment *env = environment_owner.get_or_null(p_env);
|
|
|
ERR_FAIL_COND(!env);
|
|
|
+#ifdef DEBUG_ENABLED
|
|
|
+ if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) {
|
|
|
+ WARN_PRINT_ONCE_ED("Screen-space indirect lighting (SSIL) can only be enabled when using the Forward+ rendering backend.");
|
|
|
+ }
|
|
|
+#endif
|
|
|
env->ssil_enabled = p_enable;
|
|
|
env->ssil_radius = p_radius;
|
|
|
env->ssil_intensity = p_intensity;
|
|
@@ -622,6 +647,11 @@ float RendererEnvironmentStorage::environment_get_ssil_normal_rejection(RID p_en
|
|
|
void RendererEnvironmentStorage::environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
|
|
|
Environment *env = environment_owner.get_or_null(p_env);
|
|
|
ERR_FAIL_COND(!env);
|
|
|
+#ifdef DEBUG_ENABLED
|
|
|
+ if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) {
|
|
|
+ WARN_PRINT_ONCE_ED("SDFGI can only be enabled when using the Forward+ rendering backend.");
|
|
|
+ }
|
|
|
+#endif
|
|
|
env->sdfgi_enabled = p_enable;
|
|
|
env->sdfgi_cascades = p_cascades;
|
|
|
env->sdfgi_min_cell_size = p_min_cell_size;
|
|
@@ -699,6 +729,11 @@ RS::EnvironmentSDFGIYScale RendererEnvironmentStorage::environment_get_sdfgi_y_s
|
|
|
void RendererEnvironmentStorage::environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) {
|
|
|
Environment *env = environment_owner.get_or_null(p_env);
|
|
|
ERR_FAIL_COND(!env);
|
|
|
+#ifdef DEBUG_ENABLED
|
|
|
+ if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" && p_enable) {
|
|
|
+ WARN_PRINT_ONCE_ED("Adjustments are not supported when using the GL Compatibility backend yet. Support will be added in a future release.");
|
|
|
+ }
|
|
|
+#endif
|
|
|
env->adjustments_enabled = p_enable;
|
|
|
env->adjustments_brightness = p_brightness;
|
|
|
env->adjustments_contrast = p_contrast;
|