You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Prevent a rendering crash and error spam for uniform texture array
This commit is contained in:
@@ -2672,9 +2672,11 @@ void RendererStorageRD::MaterialData::update_textures(const Map<StringName, Vari
|
|||||||
if (uniform_array_size > 0) {
|
if (uniform_array_size > 0) {
|
||||||
if (textures.size() < uniform_array_size) {
|
if (textures.size() < uniform_array_size) {
|
||||||
const Map<StringName, RID>::Element *W = p_default_textures.find(uniform_name);
|
const Map<StringName, RID>::Element *W = p_default_textures.find(uniform_name);
|
||||||
if (W) {
|
|
||||||
for (int j = textures.size(); j < uniform_array_size; j++) {
|
for (int j = textures.size(); j < uniform_array_size; j++) {
|
||||||
|
if (W) {
|
||||||
textures.push_back(W->get());
|
textures.push_back(W->get());
|
||||||
|
} else {
|
||||||
|
textures.push_back(RID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user