You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user