basically the title. cuious why this decison was made.
I have a packed struct Material containing multiple f32s, because there is no hashing for the fields, I just bitcast it, which works fine enough.
pub fn material(self: *Self, mat: Material) u32 {
const lol: u256 = @bitCast(mat);
if (self.materials.get(lol)) |id| {
return id;
}
const id = self.material_count;
self.materials.put(lol, id) catch unreachable;
return id;
}