Default PanoramaSkyMaterial texture to black instead of white

This prevents blinding the user while the user is still setting up
the panorama sky texture.
This commit is contained in:
Hugo Locurcio 2022-02-13 22:03:09 +01:00
parent 48ed0400bc
commit a86deac049
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

View file

@ -371,8 +371,11 @@ void PanoramaSkyMaterial::_update_shader() {
// Add a comment to describe the shader origin (useful when converting to ShaderMaterial).
RS::get_singleton()->shader_set_code(shader_cache[i], vformat(R"(
// NOTE: Shader automatically converted from )" VERSION_NAME " " VERSION_FULL_CONFIG R"('s PanoramaSkyMaterial.
shader_type sky;
uniform sampler2D source_panorama : %s, hint_albedo;
uniform sampler2D source_panorama : %s, hint_black_albedo;
void sky() {
COLOR = texture(source_panorama, SKY_COORDS).rgb;
}