diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index e1e50a2b515..5f10cb3c820 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -17,14 +17,14 @@ Sets the exposure of the sky. Higher exposure values make the entire sky brighter. - + Modulates the [Color] on the bottom half of the sky to represent the ground. Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon. - - Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets. + + Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien-looking planets. Controls the direction of the mie scattering. A value of [code]1[/code] means that when light hits a particle it's passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards. @@ -35,14 +35,14 @@ Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. - - Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a Mars looking atmosphere with a corresponding blue sunset. + + Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red [Color] results in a Mars-looking atmosphere with a corresponding blue sunset. Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. - Sets the thickness of the atmosphere. High turbidity creates a foggy looking atmosphere, while a low turbidity results in a clearer atmosphere. + Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index e3db74894b6..dc6ead1b010 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -11,7 +11,7 @@ - + Color of the ground at the bottom. Blends with [member ground_horizon_color]. @@ -20,25 +20,25 @@ Amount of energy contribution from the ground. - + Color of the ground at the horizon. Blends with [member ground_bottom_color]. - + How quickly the [member sky_horizon_color] fades into the [member sky_top_color]. Amount of energy contribution from the sky. - + Color of the sky at the horizon. Blends with [member sky_top_color]. - + Color of the sky at the top. Blends with [member sky_horizon_color]. - + Distance from center of sun where it fades out completely. - + How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max]. diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 5f587245946..0c6fa9fb437 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -7353,8 +7353,8 @@ void Node3DEditor::_load_default_preview_settings() { sun_angle_altitude->set_value(-Math::rad2deg(sun_rotation.x)); sun_angle_azimuth->set_value(180.0 - Math::rad2deg(sun_rotation.y)); sun_direction->update(); - environ_sky_color->set_pick_color(Color::hex(0x91b2ceff)); - environ_ground_color->set_pick_color(Color::hex(0x1f1f21ff)); + environ_sky_color->set_pick_color(Color(0.385, 0.454, 0.55)); + environ_ground_color->set_pick_color(Color(0.2, 0.169, 0.133)); environ_energy->set_value(1.0); environ_glow_button->set_pressed(true); environ_tonemap_button->set_pressed(true); diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp index c5d5ba2912f..8e633a40759 100644 --- a/scene/resources/sky_material.cpp +++ b/scene/resources/sky_material.cpp @@ -208,16 +208,16 @@ void ProceduralSkyMaterial::_update_shader() { shader_type sky; -uniform vec4 sky_top_color : hint_color = vec4(0.35, 0.46, 0.71, 1.0); -uniform vec4 sky_horizon_color : hint_color = vec4(0.55, 0.69, 0.81, 1.0); -uniform float sky_curve : hint_range(0, 1) = 0.09; +uniform vec4 sky_top_color : hint_color = vec4(0.385, 0.454, 0.55, 1.0); +uniform vec4 sky_horizon_color : hint_color = vec4(0.646, 0.656, 0.67, 1.0); +uniform float sky_curve : hint_range(0, 1) = 0.15; uniform float sky_energy = 1.0; -uniform vec4 ground_bottom_color : hint_color = vec4(0.12, 0.12, 0.13, 1.0); -uniform vec4 ground_horizon_color : hint_color = vec4(0.37, 0.33, 0.31, 1.0); +uniform vec4 ground_bottom_color : hint_color = vec4(0.2, 0.169, 0.133, 1.0); +uniform vec4 ground_horizon_color : hint_color = vec4(0.646, 0.656, 0.67, 1.0); uniform float ground_curve : hint_range(0, 1) = 0.02; uniform float ground_energy = 1.0; -uniform float sun_angle_max = 1.74; -uniform float sun_curve : hint_range(0, 1) = 0.05; +uniform float sun_angle_max = 30.0; +uniform float sun_curve : hint_range(0, 1) = 0.15; void sky() { float v_angle = acos(clamp(EYEDIR.y, -1.0, 1.0)); @@ -277,18 +277,18 @@ void sky() { } ProceduralSkyMaterial::ProceduralSkyMaterial() { - set_sky_top_color(Color(0.35, 0.46, 0.71)); - set_sky_horizon_color(Color(0.55, 0.69, 0.81)); - set_sky_curve(0.09); + set_sky_top_color(Color(0.385, 0.454, 0.55)); + set_sky_horizon_color(Color(0.6463, 0.6558, 0.6708)); + set_sky_curve(0.15); set_sky_energy(1.0); - set_ground_bottom_color(Color(0.12, 0.12, 0.13)); - set_ground_horizon_color(Color(0.37, 0.33, 0.31)); + set_ground_bottom_color(Color(0.2, 0.169, 0.133)); + set_ground_horizon_color(Color(0.6463, 0.6558, 0.6708)); set_ground_curve(0.02); set_ground_energy(1.0); - set_sun_angle_max(100.0); - set_sun_curve(0.05); + set_sun_angle_max(30.0); + set_sun_curve(0.15); } ProceduralSkyMaterial::~ProceduralSkyMaterial() { @@ -583,14 +583,14 @@ void PhysicalSkyMaterial::_update_shader() { shader_type sky; uniform float rayleigh : hint_range(0, 64) = 2.0; -uniform vec4 rayleigh_color : hint_color = vec4(0.26, 0.41, 0.58, 1.0); +uniform vec4 rayleigh_color : hint_color = vec4(0.3, 0.405, 0.6, 1.0); uniform float mie : hint_range(0, 1) = 0.005; uniform float mie_eccentricity : hint_range(-1, 1) = 0.8; -uniform vec4 mie_color : hint_color = vec4(0.63, 0.77, 0.92, 1.0); +uniform vec4 mie_color : hint_color = vec4(0.69, 0.729, 0.812, 1.0); uniform float turbidity : hint_range(0, 1000) = 10.0; uniform float sun_disk_scale : hint_range(0, 360) = 1.0; -uniform vec4 ground_color : hint_color = vec4(1.0); +uniform vec4 ground_color : hint_color = vec4(0.1, 0.07, 0.034, 1.0); uniform float exposure : hint_range(0, 128) = 0.1; uniform float dither_strength : hint_range(0, 10) = 1.0; @@ -680,13 +680,13 @@ void sky() { PhysicalSkyMaterial::PhysicalSkyMaterial() { set_rayleigh_coefficient(2.0); - set_rayleigh_color(Color(0.26, 0.41, 0.58)); + set_rayleigh_color(Color(0.3, 0.405, 0.6)); set_mie_coefficient(0.005); set_mie_eccentricity(0.8); - set_mie_color(Color(0.63, 0.77, 0.92)); + set_mie_color(Color(0.69, 0.729, 0.812)); set_turbidity(10.0); set_sun_disk_scale(1.0); - set_ground_color(Color(1.0, 1.0, 1.0)); + set_ground_color(Color(0.1, 0.07, 0.034)); set_exposure(0.1); set_dither_strength(1.0); }