This commit is contained in:
Quaternions 2024-02-07 21:54:14 -08:00
parent f412874317
commit 418e3b756e
2 changed files with 2 additions and 0 deletions

View File

@ -250,6 +250,7 @@ impl GraphicsState{
});
texture_index
};
//this utm_id is going to take a lot of hashing to generate!
unique_texture_models[utm_id.get() as usize].instances.push(instance);
}
}

View File

@ -338,6 +338,7 @@ impl From<&model::Mesh> for PhysicsMesh{
for &v in poly_vertices{
dot+=normal.dot(mesh.unique_pos[mesh.unique_vertices[v.get() as usize].pos.get() as usize]);
}
//assume face hash is stable, and there are no flush faces...
let face=Face{normal,dot:dot/len as i64};
let face_id=match face_id_from_face.get(&face){
Some(&face_id)=>face_id,