Jump to content

  • Log In with Google      Sign In   
  • Create Account


float in HLSL question


Old topic!
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.

  • You cannot reply to this topic
1 reply to this topic

#1 lomateron   Members   -  Reputation: 281

Like
0Likes
Like

Posted 19 April 2013 - 10:55 AM

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



Sponsor:

#2 VladR   Members   -  Reputation: 722

Like
0Likes
Like

Posted 19 April 2013 - 05:13 PM

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

 





Old topic!
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.



PARTNERS