Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

float in HLSL question

4: Adsense

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   

491
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



#2 VladR   Members   

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.