avoiding 16/32bit RTTs

Started by
4 comments, last by Dmytry 19 years, 7 months ago
hihi! i was wondering if there is a way(there seems to be!) to avoid using 16/32bit RTTs, and use 8bit instead, considering somehow we get to use back those 16/32bit values we need to use in another pass. thx! Edwinz
Advertisement
The only hardware I know of that supports 8 bit render targets is the Matrox Parhelia, none of the ATI or nVIDIA cards support 8 bit render targets. You can sometimes do tricks where you pack 4 8 bit values into one A8R8G8B8 texture but you can't do much better than that.

Game Programming Blog: www.mattnewport.com/blog

hihi!
thx fer replying!

actually that is not what i what to meant though...I understand that the minimum bits for an RTT is 32bit(8 bit per color channel).

what i need to ask is whether we could avoid using 64bit RTTs(16bit per color channel) and 128bit RTTs(32bit per color channel), and use 32bit RTTs instead(8bit per color channel)...even though our outputs can be arbitrarily floating values(inclusive of negative values)...

basically, is there a way to "pack" arbitrary floating values into 8 bit per color channel and then in another pass, unpack these values, to get back an approximate floating value (inclusive of negatives)...

thx!
Edwinz
Ahh, ok, I see what you're asking now. There's a few tricks you can do but none of them work terribly well. One option is to use R, G and B as an 8 bit mantissa and then A as an 8 bit exponent that applies to all 3 channels. If your R, G and B values are all within a fairly small range of each other this can work ok I believe. This is sometimes known as RGBE encoding (E is for exponent). FDRI looks interesting as well but there's no real technical details on how it works yet so it's hard to judge how useful it might be.

Game Programming Blog: www.mattnewport.com/blog

Cg provides pack() and unpack() instructions exactly for this purpose. Of course, they are only supported by nvidia hardware >= FX ...
"Math is hard" -Barbie
Quote:Original post by mattnewport
Ahh, ok, I see what you're asking now. There's a few tricks you can do but none of them work terribly well. One option is to use R, G and B as an 8 bit mantissa and then A as an 8 bit exponent that applies to all 3 channels. If your R, G and B values are all within a fairly small range of each other this can work ok I believe. This is sometimes known as RGBE encoding (E is for exponent). FDRI looks interesting as well but there's no real technical details on how it works yet so it's hard to judge how useful it might be.

in fact,RGBE is a quite good idea,as eye can not detect tiny amount of green or blue if there's alot of red, and so-on. It's how eyes work,that R,G,B is all within small range.

This topic is closed to new replies.

Advertisement