Jump to content
  • Advertisement
Sign in to follow this  
ivarbug

a GLSL Link error #SOLVED

This topic is 4269 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Well, i guess you can't bind a sampler in a vertex shader, right?
But a nice idea anyway ^^

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!