ker wrote:
I've always wondered, why are the material indices floats to begin with?
I'm not exactly sure which GPUs support integer types but I don't think it's all of them. I'm sure that DirectX10+ hardware will support them for indexing texture arrays, etc, but I don't know about older hardware. Whereas I do know that floats work everywhere.
However, PolyVox could (and probably should) still output integer materials and leave it up to the user to cast them to floats if necessary for their particular target hardware. The reason it doesn't do this at the moment is that it is currently possible to do a direct memcpy() of the index/vertex buffers which is theorectically faster than iterating over each vertex and copying/casting them one at a time.
In practice, many people are not doing a memcpy() anyway as they are using things like Ogre::ManualObject. Also, for some applications you want to split the mesh or duplicate triangles so in this case you are iteratng over the data anyway. I think in the future the data type will get changed to int rather than float.