cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

mp3butcher
Journeyman III

[GLSL on ATIHD4800]No matching overloaded function found texture3D

Hello I just update my driver and attempt to run a simple volume rendering GLSL shader on my ATI using ARB_fragmentshader

However I get an incredible error: the function texture3D is apparently not define?!!! I have the same error on my HTPC with a HD4xxxx chipset...

My shader :

uniform sampler3D  tex3D;
uniform sampler1D  tf;//transfert function


void main(){
 
vec4 col= texture3D(tex3D, gl_TexCoord[0]);
gl_FragColor= texture1D(tf, col.a);

}



My error:

FRAGMENT glCompileShader "" FAILED
FRAGMENT Shader "" infolog:
Fragment shader failed to compile with the following errors:
ERROR: 0:7: error(#202) No matching overloaded function found texture3D
ERROR: 0:7: error(#160) Cannot convert from 'const float' to 'highp 4-component
vector of float'
ERROR: error(#273) 2 compilation errors.  No code generated

glLinkProgram "" FAILED
Program "" infolog:
Fragment shader(s) were not successfully compiled before glLinkProgram() was cal
led.  Link failed.

PLIZE Help!!!!

 

0 Likes
1 Reply
frali
Staff

The texture3D is defined in glsl spec as -
vec4 texture3D (sampler3D sampler, vec3 coord [, float bias] );

So it's a fault to write the code as -
vec4 col= texture3D(tex3D, gl_TexCoord[0]);
It should be -
vec4 col= texture3D(tex3D, gl_TexCoord[0].xyz);

0 Likes