float in HLSL question

Started by
0 comments, last by VladR 10 years, 12 months ago

Is every nondecimal positive float number stored in the 23 bits of the float array, from 0 to 2^23?

I want to store more than one number in 1 float array, so i will convert my float(that i am sure is never decimal) to a uint and then take out its numbers using biteshift operators

Advertisement

Are you talking about using arithmetic coder (to compress the floats) or is this about the precision of the mantissa/exponent ?

If it is the former, did you try using the half precision formats already ?

It is enitrely possible to remap whichever range you wish into the range of int, withe the precision dependent on the range (of course) and just reconstruct the final value inside vertex shader. Some compression schemes are even free to decompress (as far as the performance is concerned).

VladR My 3rd person action RPG on GreenLight: http://steamcommunity.com/sharedfiles/filedetails/?id=92951596

This topic is closed to new replies.

Advertisement