jalberse / shimmer

Physically based rendering in Rust
Apache License 2.0
33 stars 0 forks source link

Make Triangle more memory efficient #81

Open jalberse opened 3 months ago

jalberse commented 3 months ago

Triangle stores an Arc to the shared triangle mesh.

We could make that smaller by instead storing some u32 offset into a list of triangle meshes. The list of meshes would be constant; I suppose we could pass a reference to it in Triangle functions.

I think this could reduce memory consumption by quite a bit - need to get measurements, though