diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-02-13 22:03:09 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-02-13 22:03:09 +0100 |
commit | a86deac049a87020f6a400f6817dc7e82cad8caa (patch) | |
tree | a14c6c4b462a30bbd0d949cc16560543fa4ee6d5 /scene/resources | |
parent | 48ed0400bc2313b9652d7f6cfd6119d784adc956 (diff) |
Default PanoramaSkyMaterial texture to black instead of white
This prevents blinding the user while the user is still setting up
the panorama sky texture.
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/sky_material.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp index 8e633a4075..71581ce03d 100644 --- a/scene/resources/sky_material.cpp +++ b/scene/resources/sky_material.cpp @@ -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; } |