PDA

View Full Version : High Res Textures



jtipton
06-06-2005, 10:02 AM
I am doing some volume rendering of CT data using 3D textures. The CT data is 12 bit data. In the past I have converted this to 8 bit data and stored it in unsigned chars. I would now like to leave it alone and store it in unsigned shorts. When I do this, the image that is displayed is very dark. It is not the same image as the 8 bit image. Is there a trick to passing in texels that are not of type UNSIGNED_BYTE?

ZbuffeR
06-06-2005, 11:28 AM
Maybe you just need to shift your 12 bits values 4 bits to the left (x16) so that they match the 16 bits of unsigned short ?

jtipton
06-06-2005, 12:13 PM
I ended up scaling my input value by using glPixelTransfer to make them 16 bit. Then I asked GL to store the texture internally as 12 bit when I created my texture. Is the bit shifting a better solution?

jtipton
06-06-2005, 12:51 PM
I tried the bit shift, and it produced an image that looked good. However, it was not numerically accurate. The pixel transfer equation was right on. Thanks for your help.