mirror of https://github.com/godotengine/godot
Fix wrong default texture for global uniforms of type `sampler2DArray`
This commit is contained in:
parent
d59994688c
commit
fa30719814
|
|
@ -872,7 +872,11 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
|
|||
E->value = global_textures_pass;
|
||||
}
|
||||
|
||||
textures.push_back(v->override.get_type() != Variant::NIL ? v->override : v->value);
|
||||
if (v->override.get_type() == Variant::RID && ((RID)v->override).is_valid()) {
|
||||
textures.push_back(v->override);
|
||||
} else if (v->value.get_type() == Variant::RID && ((RID)v->value).is_valid()) {
|
||||
textures.push_back(v->value);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -906,7 +906,11 @@ void MaterialStorage::MaterialData::update_textures(const HashMap<StringName, Va
|
|||
E->value = global_textures_pass;
|
||||
}
|
||||
|
||||
textures.push_back(v->override.get_type() != Variant::NIL ? v->override : v->value);
|
||||
if (v->override.get_type() == Variant::RID && ((RID)v->override).is_valid()) {
|
||||
textures.push_back(v->override);
|
||||
} else if (v->value.get_type() == Variant::RID && ((RID)v->value).is_valid()) {
|
||||
textures.push_back(v->value);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue