From 55dae4b68013a5c091abba86c725300bccfe1459 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 13 Mar 2025 17:13:35 +0100 Subject: fix mesh bugs --- src/classes/mesh.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/classes/mesh.rs') diff --git a/src/classes/mesh.rs b/src/classes/mesh.rs index 3883535..328af97 100644 --- a/src/classes/mesh.rs +++ b/src/classes/mesh.rs @@ -132,7 +132,8 @@ impl VertexData { .channels .iter() .filter(|c| c.stream == si) - .map(|c| c.dimension as usize * c.format.component_size()) + // The modulo operator here is a hack to fix normal with 52 dimensions to 4 + .map(|c| (c.dimension as usize % 48) * c.format.component_size()) .sum(); streams.push((offset, stride)); offset += stride * self.vertex_count as usize -- cgit v1.2.3-70-g09d2