2014-02-10 01:10:30 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* environment.h */
|
|
|
|
/*************************************************************************/
|
|
|
|
/* This file is part of: */
|
|
|
|
/* GODOT ENGINE */
|
2017-08-27 12:16:55 +00:00
|
|
|
/* https://godotengine.org */
|
2014-02-10 01:10:30 +00:00
|
|
|
/*************************************************************************/
|
2020-01-01 10:16:22 +00:00
|
|
|
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
|
|
|
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
2014-02-10 01:10:30 +00: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-04 23:50:27 +00:00
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
#ifndef ENVIRONMENT_H
|
|
|
|
#define ENVIRONMENT_H
|
|
|
|
|
2018-09-11 16:13:45 +00:00
|
|
|
#include "core/resource.h"
|
2019-02-12 16:18:13 +00:00
|
|
|
#include "scene/resources/sky.h"
|
2017-03-05 15:44:50 +00:00
|
|
|
#include "scene/resources/texture.h"
|
|
|
|
#include "servers/visual_server.h"
|
2014-02-10 01:10:30 +00:00
|
|
|
|
|
|
|
class Environment : public Resource {
|
|
|
|
|
2017-03-05 15:44:50 +00:00
|
|
|
GDCLASS(Environment, Resource);
|
2014-02-10 01:10:30 +00:00
|
|
|
|
2017-03-05 15:44:50 +00:00
|
|
|
public:
|
2016-10-21 10:27:13 +00:00
|
|
|
enum BGMode {
|
2014-02-10 01:10:30 +00:00
|
|
|
|
2016-10-21 10:27:13 +00:00
|
|
|
BG_CLEAR_COLOR,
|
|
|
|
BG_COLOR,
|
2017-05-25 16:53:59 +00:00
|
|
|
BG_SKY,
|
2016-10-21 10:27:13 +00:00
|
|
|
BG_CANVAS,
|
|
|
|
BG_KEEP,
|
2017-08-20 14:17:24 +00:00
|
|
|
BG_CAMERA_FEED,
|
2016-10-21 10:27:13 +00:00
|
|
|
BG_MAX
|
2014-02-10 01:10:30 +00:00
|
|
|
};
|
|
|
|
|
2019-08-26 20:43:58 +00: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-29 23:48:09 +00:00
|
|
|
enum ToneMapper {
|
|
|
|
TONE_MAPPER_LINEAR,
|
|
|
|
TONE_MAPPER_REINHARDT,
|
|
|
|
TONE_MAPPER_FILMIC,
|
2016-12-07 20:49:52 +00:00
|
|
|
TONE_MAPPER_ACES
|
2014-02-10 01:10:30 +00:00
|
|
|
};
|
|
|
|
|
2016-12-08 12:48:38 +00:00
|
|
|
enum GlowBlendMode {
|
|
|
|
GLOW_BLEND_MODE_ADDITIVE,
|
|
|
|
GLOW_BLEND_MODE_SCREEN,
|
|
|
|
GLOW_BLEND_MODE_SOFTLIGHT,
|
|
|
|
GLOW_BLEND_MODE_REPLACE,
|
2020-01-10 00:40:26 +00:00
|
|
|
GLOW_BLEND_MODE_MIX,
|
2014-05-29 13:56:39 +00:00
|
|
|
};
|
|
|
|
|
2017-10-22 16:52:31 +00:00
|
|
|
enum SSAOBlur {
|
|
|
|
SSAO_BLUR_DISABLED,
|
|
|
|
SSAO_BLUR_1x1,
|
|
|
|
SSAO_BLUR_2x2,
|
|
|
|
SSAO_BLUR_3x3
|
|
|
|
};
|
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
private:
|
|
|
|
RID environment;
|
|
|
|
|
2016-10-21 10:27:13 +00:00
|
|
|
BGMode bg_mode;
|
2017-05-25 16:53:59 +00:00
|
|
|
Ref<Sky> bg_sky;
|
2017-09-29 21:56:05 +00:00
|
|
|
float bg_sky_custom_fov;
|
2019-08-26 20:43:58 +00:00
|
|
|
Vector3 sky_rotation;
|
2016-10-21 10:27:13 +00:00
|
|
|
Color bg_color;
|
|
|
|
float bg_energy;
|
|
|
|
int bg_canvas_max_layer;
|
|
|
|
Color ambient_color;
|
|
|
|
float ambient_energy;
|
2020-01-25 10:18:55 +00:00
|
|
|
Color ao_color;
|
2017-05-25 16:53:59 +00:00
|
|
|
float ambient_sky_contribution;
|
2017-08-20 14:17:24 +00:00
|
|
|
int camera_feed_id;
|
2019-08-26 20:43:58 +00:00
|
|
|
AmbientSource ambient_source;
|
|
|
|
ReflectionSource reflection_source;
|
2016-10-21 10:27:13 +00:00
|
|
|
|
2016-10-29 23:48:09 +00:00
|
|
|
ToneMapper tone_mapper;
|
|
|
|
float tonemap_exposure;
|
|
|
|
float tonemap_white;
|
|
|
|
bool tonemap_auto_exposure;
|
|
|
|
float tonemap_auto_exposure_max;
|
|
|
|
float tonemap_auto_exposure_min;
|
|
|
|
float tonemap_auto_exposure_speed;
|
2016-12-07 20:49:52 +00:00
|
|
|
float tonemap_auto_exposure_grey;
|
2016-10-29 23:48:09 +00:00
|
|
|
|
|
|
|
bool adjustment_enabled;
|
|
|
|
float adjustment_contrast;
|
|
|
|
float adjustment_saturation;
|
|
|
|
float adjustment_brightness;
|
2019-06-11 18:43:37 +00:00
|
|
|
Ref<Texture2D> adjustment_color_correction;
|
2016-10-29 23:48:09 +00:00
|
|
|
|
2016-11-29 22:55:12 +00:00
|
|
|
bool ssr_enabled;
|
|
|
|
int ssr_max_steps;
|
2017-06-16 00:28:05 +00:00
|
|
|
float ssr_fade_in;
|
|
|
|
float ssr_fade_out;
|
2016-11-29 22:55:12 +00:00
|
|
|
float ssr_depth_tolerance;
|
|
|
|
bool ssr_roughness;
|
|
|
|
|
2016-12-04 15:45:30 +00:00
|
|
|
bool ssao_enabled;
|
|
|
|
float ssao_radius;
|
|
|
|
float ssao_intensity;
|
|
|
|
float ssao_bias;
|
|
|
|
float ssao_direct_light_affect;
|
2018-07-02 19:50:52 +00:00
|
|
|
float ssao_ao_channel_affect;
|
2017-10-22 16:52:31 +00:00
|
|
|
SSAOBlur ssao_blur;
|
|
|
|
float ssao_edge_sharpness;
|
2016-12-04 15:45:30 +00:00
|
|
|
|
2016-12-08 12:48:38 +00:00
|
|
|
bool glow_enabled;
|
|
|
|
int glow_levels;
|
|
|
|
float glow_intensity;
|
|
|
|
float glow_strength;
|
2020-01-10 00:40:26 +00:00
|
|
|
float glow_mix;
|
2016-12-08 12:48:38 +00:00
|
|
|
float glow_bloom;
|
|
|
|
GlowBlendMode glow_blend_mode;
|
2017-07-08 15:12:18 +00:00
|
|
|
float glow_hdr_bleed_threshold;
|
2016-12-08 12:48:38 +00:00
|
|
|
float glow_hdr_bleed_scale;
|
2018-11-28 04:22:20 +00:00
|
|
|
float glow_hdr_luminance_cap;
|
2016-12-10 04:13:20 +00:00
|
|
|
bool glow_bicubic_upscale;
|
|
|
|
|
2017-06-07 02:16:17 +00:00
|
|
|
bool fog_enabled;
|
|
|
|
Color fog_color;
|
|
|
|
Color fog_sun_color;
|
|
|
|
float fog_sun_amount;
|
|
|
|
|
|
|
|
bool fog_depth_enabled;
|
|
|
|
float fog_depth_begin;
|
2018-11-14 01:19:11 +00:00
|
|
|
float fog_depth_end;
|
2017-06-07 02:16:17 +00:00
|
|
|
float fog_depth_curve;
|
|
|
|
|
|
|
|
bool fog_transmit_enabled;
|
|
|
|
float fog_transmit_curve;
|
|
|
|
|
|
|
|
bool fog_height_enabled;
|
|
|
|
float fog_height_min;
|
|
|
|
float fog_height_max;
|
|
|
|
float fog_height_curve;
|
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
2017-03-05 15:44:50 +00:00
|
|
|
virtual void _validate_property(PropertyInfo &property) const;
|
2019-09-14 03:37:42 +00:00
|
|
|
#ifndef DISABLE_DEPRECATED
|
2020-02-13 10:37:37 +00:00
|
|
|
// Kept for compatibility from 3.x to 4.0.
|
2019-09-14 03:37:42 +00:00
|
|
|
bool _set(const StringName &p_name, const Variant &p_value);
|
|
|
|
#endif
|
2016-10-21 10:27:13 +00:00
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
public:
|
2016-10-21 10:27:13 +00:00
|
|
|
void set_background(BGMode p_bg);
|
2019-08-26 20:43:58 +00:00
|
|
|
|
2017-05-25 16:53:59 +00:00
|
|
|
void set_sky(const Ref<Sky> &p_sky);
|
2017-09-29 21:56:05 +00:00
|
|
|
void set_sky_custom_fov(float p_scale);
|
2019-08-26 20:43:58 +00:00
|
|
|
void set_sky_rotation(const Vector3 &p_rotation);
|
2017-03-05 15:44:50 +00:00
|
|
|
void set_bg_color(const Color &p_color);
|
2016-10-21 10:27:13 +00:00
|
|
|
void set_bg_energy(float p_energy);
|
|
|
|
void set_canvas_max_layer(int p_max_layer);
|
2017-03-05 15:44:50 +00:00
|
|
|
void set_ambient_light_color(const Color &p_color);
|
2016-10-21 10:27:13 +00:00
|
|
|
void set_ambient_light_energy(float p_energy);
|
2017-05-25 16:53:59 +00:00
|
|
|
void set_ambient_light_sky_contribution(float p_energy);
|
2017-08-20 14:17:24 +00:00
|
|
|
void set_camera_feed_id(int p_camera_feed_id);
|
2019-08-26 20:43:58 +00:00
|
|
|
void set_ambient_source(AmbientSource p_source);
|
|
|
|
AmbientSource get_ambient_source() const;
|
|
|
|
void set_reflection_source(ReflectionSource p_source);
|
|
|
|
ReflectionSource get_reflection_source() const;
|
2016-10-21 10:27:13 +00:00
|
|
|
|
|
|
|
BGMode get_background() const;
|
2017-05-25 16:53:59 +00:00
|
|
|
Ref<Sky> get_sky() const;
|
2017-09-29 21:56:05 +00:00
|
|
|
float get_sky_custom_fov() const;
|
2018-12-15 05:27:03 +00:00
|
|
|
Vector3 get_sky_rotation() const;
|
2016-10-21 10:27:13 +00:00
|
|
|
Color get_bg_color() const;
|
|
|
|
float get_bg_energy() const;
|
|
|
|
int get_canvas_max_layer() const;
|
|
|
|
Color get_ambient_light_color() const;
|
|
|
|
float get_ambient_light_energy() const;
|
2017-05-25 16:53:59 +00:00
|
|
|
float get_ambient_light_sky_contribution() const;
|
2017-08-20 14:17:24 +00:00
|
|
|
int get_camera_feed_id(void) const;
|
2016-10-21 10:27:13 +00:00
|
|
|
|
2016-10-29 23:48:09 +00: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;
|
|
|
|
|
|
|
|
void set_tonemap_auto_exposure(bool p_enabled);
|
|
|
|
bool get_tonemap_auto_exposure() const;
|
|
|
|
|
|
|
|
void set_tonemap_auto_exposure_max(float p_auto_exposure_max);
|
|
|
|
float get_tonemap_auto_exposure_max() const;
|
|
|
|
|
|
|
|
void set_tonemap_auto_exposure_min(float p_auto_exposure_min);
|
|
|
|
float get_tonemap_auto_exposure_min() const;
|
|
|
|
|
|
|
|
void set_tonemap_auto_exposure_speed(float p_auto_exposure_speed);
|
|
|
|
float get_tonemap_auto_exposure_speed() const;
|
|
|
|
|
2016-12-07 20:49:52 +00:00
|
|
|
void set_tonemap_auto_exposure_grey(float p_auto_exposure_grey);
|
|
|
|
float get_tonemap_auto_exposure_grey() const;
|
2016-10-29 23:48:09 +00:00
|
|
|
|
|
|
|
void set_adjustment_enable(bool p_enable);
|
|
|
|
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;
|
|
|
|
|
2019-06-11 18:43:37 +00:00
|
|
|
void set_adjustment_color_correction(const Ref<Texture2D> &p_ramp);
|
|
|
|
Ref<Texture2D> get_adjustment_color_correction() const;
|
2016-10-29 23:48:09 +00:00
|
|
|
|
2016-11-29 22:55:12 +00:00
|
|
|
void set_ssr_enabled(bool p_enable);
|
|
|
|
bool is_ssr_enabled() const;
|
|
|
|
|
|
|
|
void set_ssr_max_steps(int p_steps);
|
|
|
|
int get_ssr_max_steps() const;
|
|
|
|
|
2017-08-11 19:10:05 +00:00
|
|
|
void set_ssr_fade_in(float p_fade_in);
|
2017-06-16 00:28:05 +00:00
|
|
|
float get_ssr_fade_in() const;
|
2016-11-29 22:55:12 +00:00
|
|
|
|
2017-08-11 19:10:05 +00:00
|
|
|
void set_ssr_fade_out(float p_fade_out);
|
2017-06-16 00:28:05 +00:00
|
|
|
float get_ssr_fade_out() const;
|
2016-11-29 22:55:12 +00:00
|
|
|
|
|
|
|
void set_ssr_depth_tolerance(float p_depth_tolerance);
|
|
|
|
float get_ssr_depth_tolerance() const;
|
|
|
|
|
|
|
|
void set_ssr_rough(bool p_enable);
|
|
|
|
bool is_ssr_rough() const;
|
|
|
|
|
2016-12-04 15:45:30 +00:00
|
|
|
void set_ssao_enabled(bool p_enable);
|
|
|
|
bool is_ssao_enabled() const;
|
|
|
|
|
|
|
|
void set_ssao_radius(float p_radius);
|
|
|
|
float get_ssao_radius() const;
|
|
|
|
|
|
|
|
void set_ssao_intensity(float p_intensity);
|
|
|
|
float get_ssao_intensity() const;
|
|
|
|
|
|
|
|
void set_ssao_bias(float p_bias);
|
|
|
|
float get_ssao_bias() const;
|
|
|
|
|
|
|
|
void set_ssao_direct_light_affect(float p_direct_light_affect);
|
|
|
|
float get_ssao_direct_light_affect() const;
|
|
|
|
|
2018-07-02 19:50:52 +00:00
|
|
|
void set_ssao_ao_channel_affect(float p_ao_channel_affect);
|
|
|
|
float get_ssao_ao_channel_affect() const;
|
|
|
|
|
2020-01-25 10:18:55 +00:00
|
|
|
void set_ao_color(const Color &p_color);
|
|
|
|
Color get_ao_color() const;
|
2016-12-04 15:45:30 +00:00
|
|
|
|
2017-10-22 16:52:31 +00:00
|
|
|
void set_ssao_blur(SSAOBlur p_blur);
|
|
|
|
SSAOBlur get_ssao_blur() const;
|
|
|
|
|
|
|
|
void set_ssao_edge_sharpness(float p_edge_sharpness);
|
|
|
|
float get_ssao_edge_sharpness() const;
|
2016-12-04 15:45:30 +00:00
|
|
|
|
2016-12-08 12:48:38 +00:00
|
|
|
void set_glow_enabled(bool p_enabled);
|
|
|
|
bool is_glow_enabled() const;
|
|
|
|
|
2017-03-05 15:44:50 +00:00
|
|
|
void set_glow_level(int p_level, bool p_enabled);
|
2016-12-08 12:48:38 +00:00
|
|
|
bool is_glow_level_enabled(int p_level) const;
|
|
|
|
|
|
|
|
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 00:40:26 +00:00
|
|
|
void set_glow_mix(float p_mix);
|
|
|
|
float get_glow_mix() const;
|
|
|
|
|
2017-07-08 15:12:18 +00:00
|
|
|
void set_glow_bloom(float p_threshold);
|
2016-12-08 12:48:38 +00:00
|
|
|
float get_glow_bloom() const;
|
|
|
|
|
|
|
|
void set_glow_blend_mode(GlowBlendMode p_mode);
|
|
|
|
GlowBlendMode get_glow_blend_mode() const;
|
|
|
|
|
2017-07-08 15:12:18 +00:00
|
|
|
void set_glow_hdr_bleed_threshold(float p_threshold);
|
|
|
|
float get_glow_hdr_bleed_threshold() const;
|
2016-12-08 12:48:38 +00:00
|
|
|
|
2018-11-28 04:22:20 +00:00
|
|
|
void set_glow_hdr_luminance_cap(float p_amount);
|
|
|
|
float get_glow_hdr_luminance_cap() const;
|
|
|
|
|
2016-12-08 12:48:38 +00:00
|
|
|
void set_glow_hdr_bleed_scale(float p_scale);
|
|
|
|
float get_glow_hdr_bleed_scale() const;
|
|
|
|
|
2016-12-10 04:13:20 +00:00
|
|
|
void set_glow_bicubic_upscale(bool p_enable);
|
|
|
|
bool is_glow_bicubic_upscale_enabled() const;
|
|
|
|
|
2017-06-07 02:16:17 +00:00
|
|
|
void set_fog_enabled(bool p_enabled);
|
|
|
|
bool is_fog_enabled() const;
|
|
|
|
|
|
|
|
void set_fog_color(const Color &p_color);
|
|
|
|
Color get_fog_color() const;
|
|
|
|
|
|
|
|
void set_fog_sun_color(const Color &p_color);
|
|
|
|
Color get_fog_sun_color() const;
|
|
|
|
|
|
|
|
void set_fog_sun_amount(float p_amount);
|
|
|
|
float get_fog_sun_amount() const;
|
|
|
|
|
|
|
|
void set_fog_depth_enabled(bool p_enabled);
|
|
|
|
bool is_fog_depth_enabled() const;
|
|
|
|
|
|
|
|
void set_fog_depth_begin(float p_distance);
|
|
|
|
float get_fog_depth_begin() const;
|
|
|
|
|
2018-11-14 01:19:11 +00:00
|
|
|
void set_fog_depth_end(float p_distance);
|
|
|
|
float get_fog_depth_end() const;
|
|
|
|
|
2017-06-07 02:16:17 +00:00
|
|
|
void set_fog_depth_curve(float p_curve);
|
|
|
|
float get_fog_depth_curve() const;
|
|
|
|
|
|
|
|
void set_fog_transmit_enabled(bool p_enabled);
|
|
|
|
bool is_fog_transmit_enabled() const;
|
|
|
|
|
|
|
|
void set_fog_transmit_curve(float p_curve);
|
|
|
|
float get_fog_transmit_curve() const;
|
|
|
|
|
|
|
|
void set_fog_height_enabled(bool p_enabled);
|
|
|
|
bool is_fog_height_enabled() const;
|
|
|
|
|
|
|
|
void set_fog_height_min(float p_distance);
|
|
|
|
float get_fog_height_min() const;
|
|
|
|
|
|
|
|
void set_fog_height_max(float p_distance);
|
|
|
|
float get_fog_height_max() const;
|
|
|
|
|
|
|
|
void set_fog_height_curve(float p_distance);
|
|
|
|
float get_fog_height_curve() const;
|
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
virtual RID get_rid() const;
|
|
|
|
|
|
|
|
Environment();
|
|
|
|
~Environment();
|
|
|
|
};
|
|
|
|
|
2016-10-21 10:27:13 +00:00
|
|
|
VARIANT_ENUM_CAST(Environment::BGMode)
|
2019-08-26 20:43:58 +00:00
|
|
|
VARIANT_ENUM_CAST(Environment::AmbientSource)
|
|
|
|
VARIANT_ENUM_CAST(Environment::ReflectionSource)
|
2016-10-29 23:48:09 +00:00
|
|
|
VARIANT_ENUM_CAST(Environment::ToneMapper)
|
2016-12-08 12:48:38 +00:00
|
|
|
VARIANT_ENUM_CAST(Environment::GlowBlendMode)
|
2017-10-22 16:52:31 +00:00
|
|
|
VARIANT_ENUM_CAST(Environment::SSAOBlur)
|
2014-02-10 01:10:30 +00:00
|
|
|
|
2020-01-13 18:37:24 +00:00
|
|
|
class CameraEffects : public Resource {
|
|
|
|
|
|
|
|
GDCLASS(CameraEffects, Resource);
|
|
|
|
|
|
|
|
private:
|
|
|
|
RID camera_effects;
|
|
|
|
|
|
|
|
bool dof_blur_far_enabled;
|
|
|
|
float dof_blur_far_distance;
|
|
|
|
float dof_blur_far_transition;
|
|
|
|
|
|
|
|
bool dof_blur_near_enabled;
|
|
|
|
float dof_blur_near_distance;
|
|
|
|
float dof_blur_near_transition;
|
|
|
|
|
|
|
|
float dof_blur_amount;
|
|
|
|
|
|
|
|
bool override_exposure_enabled;
|
|
|
|
float override_exposure;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
public:
|
|
|
|
void set_dof_blur_far_enabled(bool p_enable);
|
|
|
|
bool is_dof_blur_far_enabled() const;
|
|
|
|
|
|
|
|
void set_dof_blur_far_distance(float p_distance);
|
|
|
|
float get_dof_blur_far_distance() const;
|
|
|
|
|
|
|
|
void set_dof_blur_far_transition(float p_distance);
|
|
|
|
float get_dof_blur_far_transition() const;
|
|
|
|
|
|
|
|
void set_dof_blur_near_enabled(bool p_enable);
|
|
|
|
bool is_dof_blur_near_enabled() const;
|
|
|
|
|
|
|
|
void set_dof_blur_near_distance(float p_distance);
|
|
|
|
float get_dof_blur_near_distance() const;
|
|
|
|
|
|
|
|
void set_dof_blur_near_transition(float p_distance);
|
|
|
|
float get_dof_blur_near_transition() const;
|
|
|
|
|
|
|
|
void set_dof_blur_amount(float p_amount);
|
|
|
|
float get_dof_blur_amount() const;
|
|
|
|
|
|
|
|
void set_override_exposure_enabled(bool p_enabled);
|
|
|
|
bool is_override_exposure_enabled() const;
|
|
|
|
|
|
|
|
void set_override_exposure(float p_exposure);
|
|
|
|
float get_override_exposure() const;
|
|
|
|
|
|
|
|
virtual RID get_rid() const;
|
|
|
|
|
|
|
|
CameraEffects();
|
|
|
|
~CameraEffects();
|
|
|
|
};
|
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
#endif // ENVIRONMENT_H
|