drop models with 0 visible instances

This commit is contained in:
Quaternions 2023-10-16 17:31:28 -07:00
parent cd9cf164e9
commit 87f781a656

View File

@ -234,6 +234,10 @@ impl GlobalState{
}) })
} }
}).collect(); }).collect();
//skip pushing a model if all instances are invisible
if instances.len()==0{
continue;
}
//check each group, if it's using a new texture then make a new clone of the model //check each group, if it's using a new texture then make a new clone of the model
let id=unique_texture_models.len(); let id=unique_texture_models.len();
let mut unique_textures=Vec::new(); let mut unique_textures=Vec::new();