feat: add UVs to shader pipeline

This commit is contained in:
alphafetus committed 2026-05-17 11:47:04 -04:00
1 parent 170a7ad645
commit b7e31732e6
4 files changed
+15 -6

No files matched your search

+3 -2
View File
@@ -69,8 +69,9 @@ impl MeshRegistry {
let all_norms = obj.normals();
let obj_num_verts = all_verts.len();
all_verts.iter().zip(all_norms.iter())
.for_each(|(pos, norm)| {
buf_verts.push(Vertex3::new(*pos, *norm));
.zip(obj.uvs().iter())
.for_each(|((pos, norm), uv)| {
buf_verts.push(Vertex3::new(*pos, *norm, *uv));
});
// buf_verts.extend(all_verts.map(|v| Vertex3::new(v.position(), v.normal().unwrap_or_default())));