Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 18 February 2013 - 04:30 AM
Posted 18 February 2013 - 04:50 AM
Posted 18 February 2013 - 04:59 AM
I'm using SM3 for the shader, and XNA 4 (so 4 bytes = 1 single/float). I just did a bit more digging through msdn and it looks like there is no support for a byte type equivalent. which probably means id have to do something mad like cast the float in HLSL as an integer then do some bit manipulation which I believe isn't available either.
You mentioned just passing the bytes on their own unpacked which may lead to a solution, though if it does convert each byte to a float then it'd remove the advantage by taking 4 times the space of just 4 plain old bytes which takes me back to the original problem.
Looks like i'll just have to suck it up, use the boolean packing example I found, and make the best of it.
Posted 18 February 2013 - 05:11 AM
Edited by Hodgman, 18 February 2013 - 05:14 AM.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.