summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_scene_gles3.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/rasterizer_scene_gles3.h')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h166
1 files changed, 80 insertions, 86 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 4b4a0b9303..1d84fb487b 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -145,6 +145,8 @@ public:
uint32_t fog_depth_enabled;
float fog_depth_begin;
+ float fog_depth_end;
+ float fog_density;
float fog_depth_curve;
uint32_t fog_transmit_enabled;
float fog_transmit_curve;
@@ -402,6 +404,7 @@ public:
VS::EnvironmentGlowBlendMode glow_blend_mode;
float glow_hdr_bleed_threshold;
float glow_hdr_bleed_scale;
+ float glow_hdr_luminance_cap;
bool glow_bicubic_upscale;
VS::EnvironmentToneMapper tone_mapper;
@@ -438,6 +441,7 @@ public:
bool fog_depth_enabled;
float fog_depth_begin;
+ float fog_depth_end;
float fog_depth_curve;
bool fog_transmit_enabled;
float fog_transmit_curve;
@@ -446,87 +450,77 @@ public:
float fog_height_max;
float fog_height_curve;
- Environment() {
- bg_mode = VS::ENV_BG_CLEAR_COLOR;
- sky_custom_fov = 0.0;
- bg_energy = 1.0;
- sky_ambient = 0;
- ambient_energy = 1.0;
- ambient_sky_contribution = 0.0;
- canvas_max_layer = 0;
-
- ssr_enabled = false;
- ssr_max_steps = 64;
- ssr_fade_in = 0.15;
- ssr_fade_out = 2.0;
- ssr_depth_tolerance = 0.2;
- ssr_roughness = true;
-
- ssao_enabled = false;
- ssao_intensity = 1.0;
- ssao_radius = 1.0;
- ssao_intensity2 = 1.0;
- ssao_radius2 = 0.0;
- ssao_bias = 0.01;
- ssao_light_affect = 0;
- ssao_ao_channel_affect = 0;
- ssao_filter = VS::ENV_SSAO_BLUR_3x3;
- ssao_quality = VS::ENV_SSAO_QUALITY_LOW;
- ssao_bilateral_sharpness = 4;
-
- tone_mapper = VS::ENV_TONE_MAPPER_LINEAR;
- tone_mapper_exposure = 1.0;
- tone_mapper_exposure_white = 1.0;
- auto_exposure = false;
- auto_exposure_speed = 0.5;
- auto_exposure_min = 0.05;
- auto_exposure_max = 8;
- auto_exposure_grey = 0.4;
-
- glow_enabled = false;
- glow_levels = (1 << 2) | (1 << 4);
- glow_intensity = 0.8;
- glow_strength = 1.0;
- glow_bloom = 0.0;
- glow_blend_mode = VS::GLOW_BLEND_MODE_SOFTLIGHT;
- glow_hdr_bleed_threshold = 1.0;
- glow_hdr_bleed_scale = 2.0;
- glow_bicubic_upscale = false;
-
- dof_blur_far_enabled = false;
- dof_blur_far_distance = 10;
- dof_blur_far_transition = 5;
- dof_blur_far_amount = 0.1;
- dof_blur_far_quality = VS::ENV_DOF_BLUR_QUALITY_MEDIUM;
-
- dof_blur_near_enabled = false;
- dof_blur_near_distance = 2;
- dof_blur_near_transition = 1;
- dof_blur_near_amount = 0.1;
- dof_blur_near_quality = VS::ENV_DOF_BLUR_QUALITY_MEDIUM;
-
- adjustments_enabled = false;
- adjustments_brightness = 1.0;
- adjustments_contrast = 1.0;
- adjustments_saturation = 1.0;
-
- fog_enabled = false;
- fog_color = Color(0.5, 0.5, 0.5);
- fog_sun_color = Color(0.8, 0.8, 0.0);
- fog_sun_amount = 0;
-
- fog_depth_enabled = true;
-
- fog_depth_begin = 10;
- fog_depth_curve = 1;
-
- fog_transmit_enabled = true;
- fog_transmit_curve = 1;
-
- fog_height_enabled = false;
- fog_height_min = 0;
- fog_height_max = 100;
- fog_height_curve = 1;
+ Environment() :
+ bg_mode(VS::ENV_BG_CLEAR_COLOR),
+ sky_custom_fov(0.0),
+ bg_energy(1.0),
+ sky_ambient(0),
+ ambient_energy(1.0),
+ ambient_sky_contribution(0.0),
+ canvas_max_layer(0),
+ ssr_enabled(false),
+ ssr_max_steps(64),
+ ssr_fade_in(0.15),
+ ssr_fade_out(2.0),
+ ssr_depth_tolerance(0.2),
+ ssr_roughness(true),
+ ssao_enabled(false),
+ ssao_intensity(1.0),
+ ssao_radius(1.0),
+ ssao_intensity2(1.0),
+ ssao_radius2(0.0),
+ ssao_bias(0.01),
+ ssao_light_affect(0),
+ ssao_ao_channel_affect(0),
+ ssao_quality(VS::ENV_SSAO_QUALITY_LOW),
+ ssao_bilateral_sharpness(4),
+ ssao_filter(VS::ENV_SSAO_BLUR_3x3),
+ glow_enabled(false),
+ glow_levels((1 << 2) | (1 << 4)),
+ glow_intensity(0.8),
+ glow_strength(1.0),
+ glow_bloom(0.0),
+ glow_blend_mode(VS::GLOW_BLEND_MODE_SOFTLIGHT),
+ glow_hdr_bleed_threshold(1.0),
+ glow_hdr_bleed_scale(2.0),
+ glow_hdr_luminance_cap(12.0),
+ glow_bicubic_upscale(false),
+ tone_mapper(VS::ENV_TONE_MAPPER_LINEAR),
+ tone_mapper_exposure(1.0),
+ tone_mapper_exposure_white(1.0),
+ auto_exposure(false),
+ auto_exposure_speed(0.5),
+ auto_exposure_min(0.05),
+ auto_exposure_max(8),
+ auto_exposure_grey(0.4),
+ dof_blur_far_enabled(false),
+ dof_blur_far_distance(10),
+ dof_blur_far_transition(5),
+ dof_blur_far_amount(0.1),
+ dof_blur_far_quality(VS::ENV_DOF_BLUR_QUALITY_MEDIUM),
+ dof_blur_near_enabled(false),
+ dof_blur_near_distance(2),
+ dof_blur_near_transition(1),
+ dof_blur_near_amount(0.1),
+ dof_blur_near_quality(VS::ENV_DOF_BLUR_QUALITY_MEDIUM),
+ adjustments_enabled(false),
+ adjustments_brightness(1.0),
+ adjustments_contrast(1.0),
+ adjustments_saturation(1.0),
+ fog_enabled(false),
+ fog_color(Color(0.5, 0.5, 0.5)),
+ fog_sun_color(Color(0.8, 0.8, 0.0)),
+ fog_sun_amount(0),
+ fog_depth_enabled(true),
+ fog_depth_begin(10),
+ fog_depth_end(0),
+ fog_depth_curve(1),
+ fog_transmit_enabled(true),
+ fog_transmit_curve(1),
+ fog_height_enabled(false),
+ fog_height_min(0),
+ fog_height_max(100),
+ fog_height_curve(1) {
}
};
@@ -544,7 +538,7 @@ public:
virtual void environment_set_dof_blur_near(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality);
virtual void environment_set_dof_blur_far(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality);
- virtual void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_bloom_threshold, VS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, bool p_bicubic_upscale);
+ virtual void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_bloom_threshold, VS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, bool p_bicubic_upscale);
virtual void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture);
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_in, float p_fade_out, float p_depth_tolerance, bool p_roughness);
@@ -555,7 +549,7 @@ public:
virtual void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, RID p_ramp);
virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_color, const Color &p_sun_color, float p_sun_amount);
- virtual void environment_set_fog_depth(RID p_env, bool p_enable, float p_depth_begin, float p_depth_curve, bool p_transmit, float p_transmit_curve);
+ virtual void environment_set_fog_depth(RID p_env, bool p_enable, float p_depth_begin, float p_depth_end, float p_depth_curve, bool p_transmit, float p_transmit_curve);
virtual void environment_set_fog_height(RID p_env, bool p_enable, float p_min_height, float p_max_height, float p_height_curve);
virtual bool is_environment(RID p_env);
@@ -637,9 +631,9 @@ public:
Vector3 bounds;
Transform transform_to_data;
- GIProbeInstance() {
- probe = NULL;
- tex_cache = 0;
+ GIProbeInstance() :
+ probe(NULL),
+ tex_cache(0) {
}
};