Add optional depth fog

This commit is contained in:
Eidolon 2022-09-18 00:31:43 -05:00 committed by Rafael Correa
parent 9283d0d65c
commit 08f4560e69
27 changed files with 406 additions and 33 deletions

View file

@ -29,6 +29,7 @@
/**************************************************************************/
#include "rendering_server.h"
#include "rendering_server.compat.inc"
#include "core/config/project_settings.h"
#include "core/object/worker_thread_pool.h"
@ -2943,7 +2944,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("environment_set_adjustment", "env", "enable", "brightness", "contrast", "saturation", "use_1d_color_correction", "color_correction"), &RenderingServer::environment_set_adjustment);
ClassDB::bind_method(D_METHOD("environment_set_ssr", "env", "enable", "max_steps", "fade_in", "fade_out", "depth_tolerance"), &RenderingServer::environment_set_ssr);
ClassDB::bind_method(D_METHOD("environment_set_ssao", "env", "enable", "radius", "intensity", "power", "detail", "horizon", "sharpness", "light_affect", "ao_channel_affect"), &RenderingServer::environment_set_ssao);
ClassDB::bind_method(D_METHOD("environment_set_fog", "env", "enable", "light_color", "light_energy", "sun_scatter", "density", "height", "height_density", "aerial_perspective", "sky_affect"), &RenderingServer::environment_set_fog);
ClassDB::bind_method(D_METHOD("environment_set_fog", "env", "enable", "light_color", "light_energy", "sun_scatter", "density", "height", "height_density", "aerial_perspective", "sky_affect", "fog_mode"), &RenderingServer::environment_set_fog, DEFVAL(RS::ENV_FOG_MODE_EXPONENTIAL));
ClassDB::bind_method(D_METHOD("environment_set_sdfgi", "env", "enable", "cascades", "min_cell_size", "y_scale", "use_occlusion", "bounce_feedback", "read_sky", "energy", "normal_bias", "probe_bias"), &RenderingServer::environment_set_sdfgi);
ClassDB::bind_method(D_METHOD("environment_set_volumetric_fog", "env", "enable", "density", "albedo", "emission", "emission_energy", "anisotropy", "length", "p_detail_spread", "gi_inject", "temporal_reprojection", "temporal_reprojection_amount", "ambient_inject", "sky_affect"), &RenderingServer::environment_set_volumetric_fog);
@ -2986,6 +2987,9 @@ void RenderingServer::_bind_methods() {
BIND_ENUM_CONSTANT(ENV_GLOW_BLEND_MODE_REPLACE);
BIND_ENUM_CONSTANT(ENV_GLOW_BLEND_MODE_MIX);
BIND_ENUM_CONSTANT(ENV_FOG_MODE_EXPONENTIAL);
BIND_ENUM_CONSTANT(ENV_FOG_MODE_DEPTH);
BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_LINEAR);
BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_REINHARD);
BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_FILMIC);