Textures in the Vertex Shader

I’d like to use a texture in the vertex shader, but I get a error in the shader when declaring a sampler2d as a parameter.

I get the following 2 errors:

error C0000: syntax error, unexpected identifier at token “sampler2d”
error C0501: type name expected at token “sampler2d”

It seems to me like it won’t recognize the sampler as a valid option.

Has anyone else run into this?


You could try using “sampler2D” (uppercase D). Not sure if this help though.