mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix default preview environment sky.
Fixes the horizon color being grey even when both the sky and ground colors are set to black, and makes the energy slider affect both hemispheres rather than only affecting the top "sky" portion.
This commit is contained in:
parent
0f20e67d8d
commit
8ca1605bbb
1 changed files with 4 additions and 2 deletions
|
@ -8534,8 +8534,10 @@ void Node3DEditor::_preview_settings_changed() {
|
|||
}
|
||||
|
||||
{ //preview env
|
||||
sky_material->set_sky_energy_multiplier(environ_energy->get_value());
|
||||
Color hz_color = environ_sky_color->get_pick_color().lerp(environ_ground_color->get_pick_color(), 0.5).lerp(Color(1, 1, 1), 0.5);
|
||||
sky_material->set_energy_multiplier(environ_energy->get_value());
|
||||
Color hz_color = environ_sky_color->get_pick_color().lerp(environ_ground_color->get_pick_color(), 0.5);
|
||||
float hz_lum = hz_color.get_luminance() * 3.333;
|
||||
hz_color = hz_color.lerp(Color(hz_lum, hz_lum, hz_lum), 0.5);
|
||||
sky_material->set_sky_top_color(environ_sky_color->get_pick_color());
|
||||
sky_material->set_sky_horizon_color(hz_color);
|
||||
sky_material->set_ground_bottom_color(environ_ground_color->get_pick_color());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue