Original Post
Hi,
I've searched the forums and the web for an answer to the topic above but I was able to find only code to do it for numbers between 0 and 1. I wonder if it's possible to encode a generic float (for example 2.3, 12.33454 or -0.4) in a rgba texture (A8R8G8B8 32 bits). I know that I can use float textures and I'm using them, however for old graphic cards like the integrated intel cards that are still in a lot of notebooks using the float format is not possible. I've compiled a couple of links bellow concerning this topic, but none of them answer my problem
http://www.gamedev.net/community/forums/topic.asp?topic_id=442138
http://www.gamedev.net/community/forums/topic.asp?topic_id=573743
http://www.gamedev.net/community/forums/topic.asp?topic_id=486847
http://www.gamedev.net/community/forums/topic.asp?topic_id=573743
http://www.gamedev.net/community/forums/topic.asp?topic_id=322318
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=265044
http://www.gamerendering.com/2008/09/25/packing-a-float-value-in-rgba/
http://theinstructionlimit.com/?p=33
http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
http://www.gamedev.net/community/forums/topic.asp?topic_id=498533
http://gamedusa.blogspot.com/2010/03/pack-normal-and-height-data-in-one.html
I wanto to pack in HLSL or GLSL and unpack in C#
[Edited by - Ivo Leitao on October 19, 2010 12:41:24 PM]
I've searched the forums and the web for an answer to the topic above but I was able to find only code to do it for numbers between 0 and 1. I wonder if it's possible to encode a generic float (for example 2.3, 12.33454 or -0.4) in a rgba texture (A8R8G8B8 32 bits). I know that I can use float textures and I'm using them, however for old graphic cards like the integrated intel cards that are still in a lot of notebooks using the float format is not possible. I've compiled a couple of links bellow concerning this topic, but none of them answer my problem
http://www.gamedev.net/community/forums/topic.asp?topic_id=442138
http://www.gamedev.net/community/forums/topic.asp?topic_id=573743
http://www.gamedev.net/community/forums/topic.asp?topic_id=486847
http://www.gamedev.net/community/forums/topic.asp?topic_id=573743
http://www.gamedev.net/community/forums/topic.asp?topic_id=322318
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=265044
http://www.gamerendering.com/2008/09/25/packing-a-float-value-in-rgba/
http://theinstructionlimit.com/?p=33
http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
http://www.gamedev.net/community/forums/topic.asp?topic_id=498533
http://gamedusa.blogspot.com/2010/03/pack-normal-and-height-data-in-one.html
I wanto to pack in HLSL or GLSL and unpack in C#
[Edited by - Ivo Leitao on October 19, 2010 12:41:24 PM]