Skip to main content
GameDev.net gamedev.net
🔒 Locked

a GLSL Link error #SOLVED

Started by ivarbug Sep 18, 2006 at 1:12 PM 5 replies 2.3k views
Original Post
ivarbug
ivarbug
Using texture lookup functions in vertex shader causes link error: "Link failed." Vertex shader:

uniform sampler2D heightMap;

void main()
{
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_TexCoord[1] = gl_MultiTexCoord1;
	vec4 v;
	v.x = gl_Vertex.x;
	v.y = texture2D(heightMap,vec2(gl_Vertex.x,gl_Vertex.z) / 256.0).a;//Link Error
	v.z = gl_Vertex.z;
	v.w = 1.0;
	gl_Position = gl_ModelViewProjectionMatrix * v;
}




so what's wrong? :) [Edited by - ivarbug on September 18, 2006 2:27:58 PM]
_the_phantom_
_the_phantom_
any other messages, such as compilation ones?
what hardware are you using?
ivarbug
ivarbug
Quote:
Well, i guess you can't bind a sampler in a vertex shader, right?
But a nice idea anyway ^^

Quote:
GLSL Spec 1.20.6
Texture lookup functions are available to both vertex and fragment shaders.

Quote:
Original post by phantom
any other messages, such as compilation ones?
what hardware are you using?

No other messages. glGetObjectParameterivARB for GL_OBJECT_COMPILE_STATUS_ARB returns 1 for each compilation.
Graphics card is crappy, RADEON X550 (slow vram)
Vertex Shader Model 2.0 - no vertex texture lookups :'(
glGetIntegerv for GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB returns 0

thanks

[Edited by - ivarbug on September 18, 2006 2:50:00 PM]
Kalidor
Kalidor
Texture lookup functions are available to vertex shaders in GLSL, the language. They are not supported on all hardware however. Only the more recent NVIDIA cards support vertex textures; ATI have yet to release a card that supports them.
MARS_999
MARS_999
Quote:
Original post by Kalidor
Texture lookup functions are available to vertex shaders in GLSL, the language. They are not supported on all hardware however. Only the more recent NVIDIA cards support vertex textures; ATI have yet to release a card that supports them.


Hold up, x1000 series IIRC supports vertex textures.
_the_phantom_
_the_phantom_
Quote:
Original post by MARS_999
Quote:
Original post by Kalidor
Texture lookup functions are available to vertex shaders in GLSL, the language. They are not supported on all hardware however. Only the more recent NVIDIA cards support vertex textures; ATI have yet to release a card that supports them.


Hold up, x1000 series IIRC supports vertex textures.



yes and no, it says we can do them and then tells you it has no texture lookup samplers for vertex shaders (blame the wording in the SM3.0 spec).

The D3D10 parts will be able to sample from a VS, GS and PS but they aren't due for another 4months at least.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.