Encoding normals.

Given that Staxel is made out of blocks and blocks have 6 sides which always point in the same direction before rotation i could encode the face normals in a single byte as long as any rotation is done through the worldmatrix and not baked into the vertices.

 

IEquatable

I was profiling when i noticed a large number of allocations of a type i recognized to be a struct.

This was surprising because  structs are value types and so not normally heap allocated unless some autoboxing happens, so after a bit of digging it turned out that by default, if you use a struct as a key in a Dictionary it gets boxed for equality operations.

Implementing IEquatable quickly fixed this issue.