View Full Version : texture sampling in vertex shader

12-27-2005, 04:02 AM
Hello everybody,

Does someone know why I get a linking error int this vertex shader?
How can I test if texture sampling at vertex processing is available?

uniform sampler1D VertexSampler;
varying vec4 interp_vertex_color;
void main()
gl_Position = ftransform();

interp_vertex_color = texture1D(VertexSampler,gl_MultiTexCoord0.x);

Thanks for any subsequent contribution!


12-27-2005, 01:46 PM
Care to share what linking error you got? (look at the info log)

I was under the impression that in a vertex shader that only texture1DLod type calls were allowed. (Not having used vertex texturing, I have not looked into it too deeply)

Also be aware that hardware support only exists on Nvidia cards and you need to use float textures that are nearest filtered.

12-29-2005, 01:59 AM
Dont' quote me but vertex textures need to be fp16 or fp32 images to work. Look on Nvidia's website for info on it...

12-29-2005, 06:06 PM
Vertex texture fetch only exists on NV40 and up.