aboutsummaryrefslogtreecommitdiff
path: root/src/classes/mesh.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/mesh.rs')
-rw-r--r--src/classes/mesh.rs3
1 files changed, 2 insertions, 1 deletions
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