1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Add a system to properly update materials if the uniform set is gone (likely deleted texture)

This commit is contained in:
Juan Linietsky
2019-07-29 15:29:43 -03:00
parent c613ead5fa
commit 6ecedd1e6c
6 changed files with 40 additions and 8 deletions

View File

@@ -1631,6 +1631,16 @@ void RasterizerStorageRD::MaterialData::update_textures(const Map<StringName, Va
}
}
void RasterizerStorageRD::material_force_update_textures(RID p_material, ShaderType p_shader_type) {
Material *material = material_owner.getornull(p_material);
if (material->shader_type != p_shader_type) {
return;
}
if (material->data) {
material->data->update_parameters(material->params, false, true);
}
}
void RasterizerStorageRD::_update_queued_materials() {
Material *material = material_update_list;
while (material) {