2014-02-10 02:10:30 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* environment.h */
|
|
|
|
/*************************************************************************/
|
|
|
|
/* This file is part of: */
|
|
|
|
/* GODOT ENGINE */
|
2017-08-27 14:16:55 +02:00
|
|
|
/* https://godotengine.org */
|
2014-02-10 02:10:30 +01:00
|
|
|
/*************************************************************************/
|
2021-01-01 20:13:46 +01:00
|
|
|
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
|
|
|
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
2014-02-10 02:10:30 +01:00
|
|
|
/* */
|
|
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
|
|
/* a copy of this software and associated documentation files (the */
|
|
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
|
|
/* the following conditions: */
|
|
|
|
/* */
|
|
|
|
/* The above copyright notice and this permission notice shall be */
|
|
|
|
/* included in all copies or substantial portions of the Software. */
|
|
|
|
/* */
|
|
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
|
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
|
/*************************************************************************/
|
2018-01-05 00:50:27 +01:00
|
|
|
|
2014-02-10 02:10:30 +01:00
|
|
|
#ifndef ENVIRONMENT_H
|
|
|
|
#define ENVIRONMENT_H
|
|
|
|
|
2020-11-07 23:33:38 +01:00
|
|
|
#include "core/io/resource.h"
|
2019-02-12 17:18:13 +01:00
|
|
|
#include "scene/resources/sky.h"
|
2017-03-05 16:44:50 +01:00
|
|
|
#include "scene/resources/texture.h"
|
2020-03-27 19:21:27 +01:00
|
|
|
#include "servers/rendering_server.h"
|
2014-02-10 02:10:30 +01:00
|
|
|
|
|
|
|
class Environment : public Resource {
|
2017-03-05 16:44:50 +01:00
|
|
|
GDCLASS(Environment, Resource);
|
2014-02-10 02:10:30 +01:00
|
|
|
|
2017-03-05 16:44:50 +01:00
|
|
|
public:
|
2016-10-21 12:27:13 +02:00
|
|
|
enum BGMode {
|
|
|
|
BG_CLEAR_COLOR,
|
|
|
|
BG_COLOR,
|
2017-05-25 18:53:59 +02:00
|
|
|
BG_SKY,
|
2016-10-21 12:27:13 +02:00
|
|
|
BG_CANVAS,
|
|
|
|
BG_KEEP,
|
2017-08-20 16:17:24 +02:00
|
|
|
BG_CAMERA_FEED,
|
2016-10-21 12:27:13 +02:00
|
|
|
BG_MAX
|
2014-02-10 02:10:30 +01:00
|
|
|
};
|
|
|
|
|
2019-08-26 22:43:58 +02:00
|
|
|
enum AmbientSource {
|
|
|
|
AMBIENT_SOURCE_BG,
|
|
|
|
AMBIENT_SOURCE_DISABLED,
|
|
|
|
AMBIENT_SOURCE_COLOR,
|
|
|
|
AMBIENT_SOURCE_SKY,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ReflectionSource {
|
|
|
|
REFLECTION_SOURCE_BG,
|
|
|
|
REFLECTION_SOURCE_DISABLED,
|
|
|
|
REFLECTION_SOURCE_SKY,
|
|
|
|
};
|
|
|
|
|
2016-10-30 01:48:09 +02:00
|
|
|
enum ToneMapper {
|
|
|
|
TONE_MAPPER_LINEAR,
|
|
|
|
TONE_MAPPER_REINHARDT,
|
|
|
|
TONE_MAPPER_FILMIC,
|
2020-07-01 14:18:13 +02:00
|
|
|
TONE_MAPPER_ACES,
|
2014-05-29 15:56:39 +02:00
|
|
|
};
|
|
|
|
|
2020-06-25 15:33:28 +02:00
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
enum GlowBlendMode {
|
|
|
|
GLOW_BLEND_MODE_ADDITIVE,
|
|
|
|
GLOW_BLEND_MODE_SCREEN,
|
|
|
|
GLOW_BLEND_MODE_SOFTLIGHT,
|
|
|
|
GLOW_BLEND_MODE_REPLACE,
|
|
|
|
GLOW_BLEND_MODE_MIX,
|
|
|
|
};
|
|
|
|
|
2014-02-10 02:10:30 +01:00
|
|
|
private:
|
|
|
|
RID environment;
|
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Background
|
2020-05-12 17:01:17 +02:00
|
|
|
BGMode bg_mode = BG_CLEAR_COLOR;
|
2017-05-25 18:53:59 +02:00
|
|
|
Ref<Sky> bg_sky;
|
2021-02-09 18:24:36 +01:00
|
|
|
float bg_sky_custom_fov = 0.0;
|
2020-07-01 14:18:13 +02:00
|
|
|
Vector3 bg_sky_rotation;
|
2016-10-21 12:27:13 +02:00
|
|
|
Color bg_color;
|
2020-07-01 14:18:13 +02:00
|
|
|
float bg_energy = 1.0;
|
|
|
|
int bg_canvas_max_layer = 0;
|
|
|
|
int bg_camera_feed_id = 1;
|
|
|
|
|
|
|
|
// Ambient light
|
2016-10-21 12:27:13 +02:00
|
|
|
Color ambient_color;
|
2020-07-01 14:18:13 +02:00
|
|
|
AmbientSource ambient_source = AMBIENT_SOURCE_BG;
|
|
|
|
float ambient_energy = 1.0;
|
|
|
|
float ambient_sky_contribution = 1.0;
|
|
|
|
ReflectionSource reflection_source = REFLECTION_SOURCE_BG;
|
|
|
|
void _update_ambient_light();
|
2016-10-21 12:27:13 +02:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Tonemap
|
2020-05-12 17:01:17 +02:00
|
|
|
ToneMapper tone_mapper = TONE_MAPPER_LINEAR;
|
2020-07-01 14:18:13 +02:00
|
|
|
float tonemap_exposure = 1.0;
|
|
|
|
float tonemap_white = 1.0;
|
|
|
|
bool tonemap_auto_exposure_enabled = false;
|
|
|
|
float tonemap_auto_exposure_min = 0.05;
|
2021-02-09 18:24:36 +01:00
|
|
|
float tonemap_auto_exposure_max = 8.0;
|
2020-07-01 14:18:13 +02:00
|
|
|
float tonemap_auto_exposure_speed = 0.5;
|
|
|
|
float tonemap_auto_exposure_grey = 0.4;
|
|
|
|
void _update_tonemap();
|
|
|
|
|
|
|
|
// SSR
|
|
|
|
bool ssr_enabled = false;
|
|
|
|
int ssr_max_steps = 64;
|
|
|
|
float ssr_fade_in = 0.15;
|
|
|
|
float ssr_fade_out = 2.0;
|
|
|
|
float ssr_depth_tolerance = 0.2;
|
|
|
|
void _update_ssr();
|
|
|
|
|
|
|
|
// SSAO
|
|
|
|
bool ssao_enabled = false;
|
2020-10-19 00:27:51 +02:00
|
|
|
float ssao_radius = 1.0;
|
2020-12-08 06:37:09 +01:00
|
|
|
float ssao_intensity = 2.0;
|
|
|
|
float ssao_power = 1.5;
|
|
|
|
float ssao_detail = 0.5;
|
|
|
|
float ssao_horizon = 0.06;
|
|
|
|
float ssao_sharpness = 0.98;
|
2020-07-01 14:18:13 +02:00
|
|
|
float ssao_direct_light_affect = 0.0;
|
|
|
|
float ssao_ao_channel_affect = 0.0;
|
|
|
|
void _update_ssao();
|
|
|
|
|
|
|
|
// SDFGI
|
|
|
|
bool sdfgi_enabled = false;
|
|
|
|
SDFGICascades sdfgi_cascades = SDFGI_CASCADES_6;
|
|
|
|
float sdfgi_min_cell_size = 0.2;
|
|
|
|
SDFGIYScale sdfgi_y_scale = SDFGI_Y_SCALE_DISABLED;
|
|
|
|
bool sdfgi_use_occlusion = false;
|
2021-02-08 01:08:59 +01:00
|
|
|
float sdfgi_bounce_feedback = 0.0;
|
2020-07-01 14:18:13 +02:00
|
|
|
bool sdfgi_read_sky_light = false;
|
|
|
|
float sdfgi_energy = 1.0;
|
|
|
|
float sdfgi_normal_bias = 1.1;
|
|
|
|
float sdfgi_probe_bias = 1.1;
|
2020-06-25 15:33:28 +02:00
|
|
|
void _update_sdfgi();
|
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Glow
|
|
|
|
bool glow_enabled = false;
|
2020-09-20 00:02:32 +02:00
|
|
|
Vector<float> glow_levels;
|
|
|
|
bool glow_normalize_levels = false;
|
2020-07-01 14:18:13 +02:00
|
|
|
float glow_intensity = 0.8;
|
|
|
|
float glow_strength = 1.0;
|
|
|
|
float glow_mix = 0.05;
|
|
|
|
float glow_bloom = 0.0;
|
|
|
|
GlowBlendMode glow_blend_mode = GLOW_BLEND_MODE_SOFTLIGHT;
|
|
|
|
float glow_hdr_bleed_threshold = 1.0;
|
|
|
|
float glow_hdr_bleed_scale = 2.0;
|
|
|
|
float glow_hdr_luminance_cap = 12.0;
|
|
|
|
void _update_glow();
|
|
|
|
|
|
|
|
// Fog
|
|
|
|
bool fog_enabled = false;
|
2020-08-14 03:07:49 +02:00
|
|
|
Color fog_light_color = Color(0.5, 0.6, 0.7);
|
|
|
|
float fog_light_energy = 1.0;
|
|
|
|
float fog_sun_scatter = 0.0;
|
|
|
|
float fog_density = 0.001;
|
|
|
|
float fog_height = 0.0;
|
|
|
|
float fog_height_density = 0.0; //can be negative to invert effect
|
2020-08-21 07:48:04 +02:00
|
|
|
float fog_aerial_perspective = 0.0;
|
2020-07-01 14:18:13 +02:00
|
|
|
|
2020-08-14 03:07:49 +02:00
|
|
|
void _update_fog();
|
2020-07-01 14:18:13 +02:00
|
|
|
|
2020-08-13 03:21:01 +02:00
|
|
|
// Volumetric Fog
|
|
|
|
bool volumetric_fog_enabled = false;
|
2021-10-03 13:28:55 +02:00
|
|
|
float volumetric_fog_density = 0.05;
|
|
|
|
Color volumetric_fog_albedo = Color(1.0, 1.0, 1.0);
|
|
|
|
Color volumetric_fog_emission = Color(0.0, 0.0, 0.0);
|
|
|
|
float volumetric_fog_emission_energy = 1.0;
|
|
|
|
float volumetric_fog_anisotropy = 0.2;
|
2020-08-13 03:21:01 +02:00
|
|
|
float volumetric_fog_length = 64.0;
|
|
|
|
float volumetric_fog_detail_spread = 2.0;
|
|
|
|
float volumetric_fog_gi_inject = 0.0;
|
2021-10-03 13:28:55 +02:00
|
|
|
float volumetric_fog_ambient_inject = false;
|
2021-02-06 15:51:56 +01:00
|
|
|
bool volumetric_fog_temporal_reproject = true;
|
|
|
|
float volumetric_fog_temporal_reproject_amount = 0.9;
|
2020-08-13 03:21:01 +02:00
|
|
|
void _update_volumetric_fog();
|
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Adjustment
|
|
|
|
bool adjustment_enabled = false;
|
|
|
|
float adjustment_brightness = 1.0;
|
|
|
|
float adjustment_contrast = 1.0;
|
|
|
|
float adjustment_saturation = 1.0;
|
2020-11-23 02:51:31 +01:00
|
|
|
bool use_1d_color_correction = true;
|
|
|
|
Ref<Texture> adjustment_color_correction;
|
2020-07-01 14:18:13 +02:00
|
|
|
void _update_adjustment();
|
|
|
|
|
2014-02-10 02:10:30 +01:00
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
2020-07-10 12:34:39 +02:00
|
|
|
virtual void _validate_property(PropertyInfo &property) const override;
|
2019-09-14 05:37:42 +02:00
|
|
|
#ifndef DISABLE_DEPRECATED
|
2020-02-13 11:37:37 +01:00
|
|
|
// Kept for compatibility from 3.x to 4.0.
|
2019-09-14 05:37:42 +02:00
|
|
|
bool _set(const StringName &p_name, const Variant &p_value);
|
|
|
|
#endif
|
2016-10-21 12:27:13 +02:00
|
|
|
|
2014-02-10 02:10:30 +01:00
|
|
|
public:
|
2020-07-10 12:34:39 +02:00
|
|
|
virtual RID get_rid() const override;
|
2019-08-26 22:43:58 +02:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Background
|
|
|
|
void set_background(BGMode p_bg);
|
|
|
|
BGMode get_background() const;
|
2017-05-25 18:53:59 +02:00
|
|
|
void set_sky(const Ref<Sky> &p_sky);
|
2020-07-01 14:18:13 +02:00
|
|
|
Ref<Sky> get_sky() const;
|
2017-09-29 23:56:05 +02:00
|
|
|
void set_sky_custom_fov(float p_scale);
|
2020-07-01 14:18:13 +02:00
|
|
|
float get_sky_custom_fov() const;
|
2019-08-26 22:43:58 +02:00
|
|
|
void set_sky_rotation(const Vector3 &p_rotation);
|
2020-07-01 14:18:13 +02:00
|
|
|
Vector3 get_sky_rotation() const;
|
2017-03-05 16:44:50 +01:00
|
|
|
void set_bg_color(const Color &p_color);
|
2020-07-01 14:18:13 +02:00
|
|
|
Color get_bg_color() const;
|
2016-10-21 12:27:13 +02:00
|
|
|
void set_bg_energy(float p_energy);
|
2020-07-01 14:18:13 +02:00
|
|
|
float get_bg_energy() const;
|
2016-10-21 12:27:13 +02:00
|
|
|
void set_canvas_max_layer(int p_max_layer);
|
2020-07-01 14:18:13 +02:00
|
|
|
int get_canvas_max_layer() const;
|
|
|
|
void set_camera_feed_id(int p_id);
|
|
|
|
int get_camera_feed_id() const;
|
|
|
|
|
|
|
|
// Ambient light
|
2017-03-05 16:44:50 +01:00
|
|
|
void set_ambient_light_color(const Color &p_color);
|
2020-07-01 14:18:13 +02:00
|
|
|
Color get_ambient_light_color() const;
|
2019-08-26 22:43:58 +02:00
|
|
|
void set_ambient_source(AmbientSource p_source);
|
|
|
|
AmbientSource get_ambient_source() const;
|
2020-07-01 14:18:13 +02:00
|
|
|
void set_ambient_light_energy(float p_energy);
|
2016-10-21 12:27:13 +02:00
|
|
|
float get_ambient_light_energy() const;
|
2020-07-01 14:18:13 +02:00
|
|
|
void set_ambient_light_sky_contribution(float p_ratio);
|
2017-05-25 18:53:59 +02:00
|
|
|
float get_ambient_light_sky_contribution() const;
|
2020-07-01 14:18:13 +02:00
|
|
|
void set_reflection_source(ReflectionSource p_source);
|
|
|
|
ReflectionSource get_reflection_source() const;
|
2016-10-21 12:27:13 +02:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Tonemap
|
2016-10-30 01:48:09 +02:00
|
|
|
void set_tonemapper(ToneMapper p_tone_mapper);
|
|
|
|
ToneMapper get_tonemapper() const;
|
|
|
|
void set_tonemap_exposure(float p_exposure);
|
|
|
|
float get_tonemap_exposure() const;
|
|
|
|
void set_tonemap_white(float p_white);
|
|
|
|
float get_tonemap_white() const;
|
2020-07-01 14:18:13 +02:00
|
|
|
void set_tonemap_auto_exposure_enabled(bool p_enabled);
|
|
|
|
bool is_tonemap_auto_exposure_enabled() const;
|
2016-10-30 01:48:09 +02:00
|
|
|
void set_tonemap_auto_exposure_min(float p_auto_exposure_min);
|
|
|
|
float get_tonemap_auto_exposure_min() const;
|
2020-07-01 14:18:13 +02:00
|
|
|
void set_tonemap_auto_exposure_max(float p_auto_exposure_max);
|
|
|
|
float get_tonemap_auto_exposure_max() const;
|
2016-10-30 01:48:09 +02:00
|
|
|
void set_tonemap_auto_exposure_speed(float p_auto_exposure_speed);
|
|
|
|
float get_tonemap_auto_exposure_speed() const;
|
2016-12-07 21:49:52 +01:00
|
|
|
void set_tonemap_auto_exposure_grey(float p_auto_exposure_grey);
|
|
|
|
float get_tonemap_auto_exposure_grey() const;
|
2016-10-30 01:48:09 +02:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// SSR
|
|
|
|
void set_ssr_enabled(bool p_enabled);
|
2016-11-29 23:55:12 +01:00
|
|
|
bool is_ssr_enabled() const;
|
|
|
|
void set_ssr_max_steps(int p_steps);
|
|
|
|
int get_ssr_max_steps() const;
|
2017-08-11 21:10:05 +02:00
|
|
|
void set_ssr_fade_in(float p_fade_in);
|
2017-06-16 02:28:05 +02:00
|
|
|
float get_ssr_fade_in() const;
|
2017-08-11 21:10:05 +02:00
|
|
|
void set_ssr_fade_out(float p_fade_out);
|
2017-06-16 02:28:05 +02:00
|
|
|
float get_ssr_fade_out() const;
|
2016-11-29 23:55:12 +01:00
|
|
|
void set_ssr_depth_tolerance(float p_depth_tolerance);
|
|
|
|
float get_ssr_depth_tolerance() const;
|
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// SSAO
|
|
|
|
void set_ssao_enabled(bool p_enabled);
|
2016-12-04 16:45:30 +01:00
|
|
|
bool is_ssao_enabled() const;
|
2020-10-19 00:27:51 +02:00
|
|
|
void set_ssao_radius(float p_radius);
|
|
|
|
float get_ssao_radius() const;
|
2016-12-04 16:45:30 +01:00
|
|
|
void set_ssao_intensity(float p_intensity);
|
|
|
|
float get_ssao_intensity() const;
|
2020-12-08 06:37:09 +01:00
|
|
|
void set_ssao_power(float p_power);
|
|
|
|
float get_ssao_power() const;
|
|
|
|
void set_ssao_detail(float p_detail);
|
|
|
|
float get_ssao_detail() const;
|
|
|
|
void set_ssao_horizon(float p_horizon);
|
|
|
|
float get_ssao_horizon() const;
|
|
|
|
void set_ssao_sharpness(float p_sharpness);
|
|
|
|
float get_ssao_sharpness() const;
|
2016-12-04 16:45:30 +01:00
|
|
|
void set_ssao_direct_light_affect(float p_direct_light_affect);
|
|
|
|
float get_ssao_direct_light_affect() const;
|
2018-07-02 21:50:52 +02:00
|
|
|
void set_ssao_ao_channel_affect(float p_ao_channel_affect);
|
|
|
|
float get_ssao_ao_channel_affect() const;
|
2016-12-04 16:45:30 +01:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// 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_min_cell_size(float p_size);
|
|
|
|
float get_sdfgi_min_cell_size() const;
|
|
|
|
void set_sdfgi_max_distance(float p_distance);
|
|
|
|
float get_sdfgi_max_distance() const;
|
|
|
|
void set_sdfgi_cascade0_distance(float p_distance);
|
|
|
|
float get_sdfgi_cascade0_distance() const;
|
|
|
|
void set_sdfgi_y_scale(SDFGIYScale p_y_scale);
|
|
|
|
SDFGIYScale get_sdfgi_y_scale() const;
|
|
|
|
void set_sdfgi_use_occlusion(bool p_enabled);
|
|
|
|
bool is_sdfgi_using_occlusion() const;
|
2021-02-08 01:08:59 +01:00
|
|
|
void set_sdfgi_bounce_feedback(float p_amount);
|
|
|
|
float get_sdfgi_bounce_feedback() const;
|
2020-07-01 14:18:13 +02:00
|
|
|
void set_sdfgi_read_sky_light(bool p_enabled);
|
|
|
|
bool is_sdfgi_reading_sky_light() const;
|
|
|
|
void set_sdfgi_energy(float p_energy);
|
|
|
|
float get_sdfgi_energy() const;
|
|
|
|
void set_sdfgi_normal_bias(float p_bias);
|
|
|
|
float get_sdfgi_normal_bias() const;
|
|
|
|
void set_sdfgi_probe_bias(float p_bias);
|
|
|
|
float get_sdfgi_probe_bias() const;
|
|
|
|
|
|
|
|
// Glow
|
2016-12-08 13:48:38 +01:00
|
|
|
void set_glow_enabled(bool p_enabled);
|
|
|
|
bool is_glow_enabled() const;
|
2020-09-20 00:02:32 +02:00
|
|
|
void set_glow_level(int p_level, float p_intensity);
|
|
|
|
float get_glow_level(int p_level) const;
|
|
|
|
void set_glow_normalized(bool p_normalized);
|
|
|
|
bool is_glow_normalized() const;
|
2016-12-08 13:48:38 +01:00
|
|
|
void set_glow_intensity(float p_intensity);
|
|
|
|
float get_glow_intensity() const;
|
|
|
|
void set_glow_strength(float p_strength);
|
|
|
|
float get_glow_strength() const;
|
2020-01-10 01:40:26 +01:00
|
|
|
void set_glow_mix(float p_mix);
|
|
|
|
float get_glow_mix() const;
|
2017-07-08 17:12:18 +02:00
|
|
|
void set_glow_bloom(float p_threshold);
|
2016-12-08 13:48:38 +01:00
|
|
|
float get_glow_bloom() const;
|
|
|
|
void set_glow_blend_mode(GlowBlendMode p_mode);
|
|
|
|
GlowBlendMode get_glow_blend_mode() const;
|
2017-07-08 17:12:18 +02:00
|
|
|
void set_glow_hdr_bleed_threshold(float p_threshold);
|
|
|
|
float get_glow_hdr_bleed_threshold() const;
|
2016-12-08 13:48:38 +01:00
|
|
|
void set_glow_hdr_bleed_scale(float p_scale);
|
|
|
|
float get_glow_hdr_bleed_scale() const;
|
2020-07-01 14:18:13 +02:00
|
|
|
void set_glow_hdr_luminance_cap(float p_amount);
|
|
|
|
float get_glow_hdr_luminance_cap() const;
|
2016-12-08 13:48:38 +01:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Fog
|
2020-08-14 03:07:49 +02:00
|
|
|
|
2017-06-07 04:16:17 +02:00
|
|
|
void set_fog_enabled(bool p_enabled);
|
|
|
|
bool is_fog_enabled() const;
|
2020-08-14 03:07:49 +02:00
|
|
|
void set_fog_light_color(const Color &p_light_color);
|
|
|
|
Color get_fog_light_color() const;
|
|
|
|
void set_fog_light_energy(float p_amount);
|
|
|
|
float get_fog_light_energy() const;
|
|
|
|
void set_fog_sun_scatter(float p_amount);
|
|
|
|
float get_fog_sun_scatter() const;
|
|
|
|
|
|
|
|
void set_fog_density(float p_amount);
|
|
|
|
float get_fog_density() const;
|
|
|
|
void set_fog_height(float p_amount);
|
|
|
|
float get_fog_height() const;
|
|
|
|
void set_fog_height_density(float p_amount);
|
|
|
|
float get_fog_height_density() const;
|
2020-08-21 07:48:04 +02:00
|
|
|
void set_fog_aerial_perspective(float p_aerial_perspective);
|
|
|
|
float get_fog_aerial_perspective() const;
|
2017-06-07 04:16:17 +02:00
|
|
|
|
2020-08-13 03:21:01 +02:00
|
|
|
// Volumetric Fog
|
|
|
|
void set_volumetric_fog_enabled(bool p_enable);
|
|
|
|
bool is_volumetric_fog_enabled() const;
|
|
|
|
void set_volumetric_fog_density(float p_density);
|
|
|
|
float get_volumetric_fog_density() const;
|
2021-10-03 13:28:55 +02:00
|
|
|
void set_volumetric_fog_albedo(Color p_color);
|
|
|
|
Color get_volumetric_fog_albedo() const;
|
|
|
|
void set_volumetric_fog_emission(Color p_color);
|
|
|
|
Color get_volumetric_fog_emission() const;
|
|
|
|
void set_volumetric_fog_emission_energy(float p_begin);
|
|
|
|
float get_volumetric_fog_emission_energy() const;
|
|
|
|
void set_volumetric_fog_anisotropy(float p_anisotropy);
|
|
|
|
float get_volumetric_fog_anisotropy() const;
|
2020-08-13 03:21:01 +02:00
|
|
|
void set_volumetric_fog_length(float p_length);
|
|
|
|
float get_volumetric_fog_length() const;
|
|
|
|
void set_volumetric_fog_detail_spread(float p_detail_spread);
|
|
|
|
float get_volumetric_fog_detail_spread() const;
|
|
|
|
void set_volumetric_fog_gi_inject(float p_gi_inject);
|
|
|
|
float get_volumetric_fog_gi_inject() const;
|
2021-10-03 13:28:55 +02:00
|
|
|
void set_volumetric_fog_ambient_inject(float p_ambient_inject);
|
|
|
|
float get_volumetric_fog_ambient_inject() const;
|
2021-02-05 14:51:49 +01:00
|
|
|
void set_volumetric_fog_temporal_reprojection_enabled(bool p_enable);
|
|
|
|
bool is_volumetric_fog_temporal_reprojection_enabled() const;
|
|
|
|
void set_volumetric_fog_temporal_reprojection_amount(float p_amount);
|
|
|
|
float get_volumetric_fog_temporal_reprojection_amount() const;
|
2020-08-13 03:21:01 +02:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
// Adjustment
|
|
|
|
void set_adjustment_enabled(bool p_enabled);
|
|
|
|
bool is_adjustment_enabled() const;
|
|
|
|
void set_adjustment_brightness(float p_brightness);
|
|
|
|
float get_adjustment_brightness() const;
|
|
|
|
void set_adjustment_contrast(float p_contrast);
|
|
|
|
float get_adjustment_contrast() const;
|
|
|
|
void set_adjustment_saturation(float p_saturation);
|
|
|
|
float get_adjustment_saturation() const;
|
2020-11-23 02:51:31 +01:00
|
|
|
void set_adjustment_color_correction(Ref<Texture> p_color_correction);
|
|
|
|
Ref<Texture> get_adjustment_color_correction() const;
|
2014-02-10 02:10:30 +01:00
|
|
|
|
|
|
|
Environment();
|
|
|
|
~Environment();
|
|
|
|
};
|
|
|
|
|
2016-10-21 12:27:13 +02:00
|
|
|
VARIANT_ENUM_CAST(Environment::BGMode)
|
2019-08-26 22:43:58 +02:00
|
|
|
VARIANT_ENUM_CAST(Environment::AmbientSource)
|
|
|
|
VARIANT_ENUM_CAST(Environment::ReflectionSource)
|
2016-10-30 01:48:09 +02:00
|
|
|
VARIANT_ENUM_CAST(Environment::ToneMapper)
|
2020-06-25 15:33:28 +02:00
|
|
|
VARIANT_ENUM_CAST(Environment::SDFGICascades)
|
|
|
|
VARIANT_ENUM_CAST(Environment::SDFGIYScale)
|
2020-07-01 14:18:13 +02:00
|
|
|
VARIANT_ENUM_CAST(Environment::GlowBlendMode)
|
2020-01-13 19:37:24 +01:00
|
|
|
|
2014-02-10 02:10:30 +01:00
|
|
|
#endif // ENVIRONMENT_H
|