Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
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

packing

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 Yours3!f   Members   

1532
Like
0Likes
Like

Posted 12 January 2013 - 07:00 AM

Hi,

 

I'd like to pack a float and two booleans into a rgba8 texture.

Unfortunately I don't really know how to do this :(

The way I imagined this is:

break up the bits of the float in 3 parts, store them in rgb, so they'd get 24 bits precision

store the two booleans in the a channel somehow...

 

any ideas how to do this?

 

best regards,

Yours3lf



#2 Yours3!f   Members   

1532
Like
0Likes
Like

Posted 12 January 2013 - 02:15 PM

I think I found the answer:
http://www.gamedev.net/topic/617368-pack-depth-into-rgb/






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.