The most efficient way to code invisible material?

Strictly technical question. I have an entity with color_map and different material_maps which I change via a custom component. The thing is I want some parts to disappear completely (all voxels of these parts have colours belonging to the color_map to avoid problems) if certain conditions are met so I need to assign the colours to a material which is not rendered at all. My question is how to code such material to avoid unnecessary shader calculations.

1 Like