Texture sampling in vertex shader

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!

Diego

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.
ftp://download.nvidia.com/developer/Papers/2004/Vertex_Textures/Vertex_Textures.pdf

Dont’ quote me but vertex textures need to be fp16 or fp32 images to work. Look on Nvidia’s website for info on it…

Vertex texture fetch only exists on NV40 and up.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.