Sign in to follow this  
lomateron

float in HLSL question

Recommended Posts

lomateron    491

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

Share this post


Link to post
Share on other sites
VladR    722

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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this