PDA

View Full Version : depth texture and ARB frag. prog. : only 8 bits of precision



gael
09-17-2003, 04:55 AM
I want to use a depth texture in an ARB fragment program but i have only 8 bits of presision when i get the value with TEX instruction.
Nevertheless, if i read the texture with glTexImage(), there are realy 24bits of presision.
I think the "TEX" instruction take only the first byte as a luminance value and not the 3 bytes ?
So, is it possible to use the 24bits in a fragment program ?

Mazy
09-17-2003, 05:02 AM
i thought you get the depthvalue in the .r compnent but still in 24bit precision.. if not, then my shadows has very high quality even in 8bit..

esc
12-20-2003, 05:10 AM
Originally posted by Mazy:
i thought you get the depthvalue in the .r compnent but still in 24bit precision.. if not, then my shadows has very high quality even in 8bit..

I have this problem too, could you clarify some more? I use a Geforce FX 5900 with driver 52.16.

I use ARB_depth_texture with 24 bits and
sample the texture like this:

"TEX depth.z, coords, texture[0], 2D;"

and only get 8 bit res.

Anyone know anything more about this?

/Chris