You've already forked godot
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user