File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
servers/rendering/renderer_rd/storage_rd Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -1966,13 +1966,9 @@ void MaterialStorage::global_shader_parameters_load_settings(bool p_load_texture
19661966 Variant value = d[" value" ];
19671967
19681968 if (gvtype >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) {
1969- // textire
1970- if (!p_load_textures) {
1971- continue ;
1972- }
1973-
19741969 String path = value;
1975- if (path.is_empty ()) {
1970+ // Don't load the textures, but still add the parameter so shaders compile correctly while loading.
1971+ if (!p_load_textures || path.is_empty ()) {
19761972 value = RID ();
19771973 } else {
19781974 Ref<Resource> resource = ResourceLoader::load (path);
Original file line number Diff line number Diff line change @@ -1656,13 +1656,9 @@ void MaterialStorage::global_shader_parameters_load_settings(bool p_load_texture
16561656 Variant value = d[" value" ];
16571657
16581658 if (gvtype >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) {
1659- // textire
1660- if (!p_load_textures) {
1661- continue ;
1662- }
1663-
16641659 String path = value;
1665- if (path.is_empty ()) {
1660+ // Don't load the textures, but still add the parameter so shaders compile correctly while loading.
1661+ if (!p_load_textures || path.is_empty ()) {
16661662 value = RID ();
16671663 } else {
16681664 Ref<Resource> resource = ResourceLoader::load (path);
You can’t perform that action at this time.
0 commit comments