PDA

View Full Version : Problems accessing depth textures (ATI only)



hals1010
07-26-2006, 06:13 AM
Hi all,

I'm having problems accessing depth textures in my GLSL fragment shader (tex. compare mode GL_NONE). Interestingly, this only happens if I use an array of samplers on an ATI card, i.e. it makes a difference if I use


uniform sampler2D u_TexDepth[2];

float fDepth0 = texture2D(u_TexDepth[0], gl_TexCoord[0].st).r;
float fDepth1 = texture2D(u_TexDepth[1], gl_TexCoord[0].st).r;or



uniform sampler2D u_TexDepth0;
uniform sampler2D u_TexDepth1;

float fDepth0 = texture2D(u_TexDepth0, gl_TexCoord[0].st).r;
float fDepth1 = texture2D(u_TexDepth1, gl_TexCoord[0].st).r;The latter one works, the first one not (although it compiles). On nvidia cards, I have no problems at all.
Has anyone else seen this before?

Thanks,
Jörn