From 87f781a656f6273323db7bbc05fd0bea409a9a1b Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 16 Oct 2023 17:31:28 -0700 Subject: [PATCH] drop models with 0 visible instances --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index d3d0628..47e87f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -234,6 +234,10 @@ impl GlobalState{ }) } }).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 let id=unique_texture_models.len(); let mut unique_textures=Vec::new();