Reputation: 697
In my vertex declaration I can use various data types for color. Including:
I can't however use a float, it causes my shader to get the incorrect value.
I know an float is 4 bytes and so are all the other datatype I listed. So why does a float not work and the others do?
Upvotes: 0
Views: 884
Reputation: 81349
How would a single float represent the 4 (A,R,G,B)
components? If you wonder how int does it, it packs 4 bytes within its 32bit (4 bytes) value.
Upvotes: 4