• Advertisement
Sign in to follow this  

Vertex Shader: Texture lookup trouble

This topic is 3862 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

Hi, I am working with a 6800GT, which is SM3.0 capable, however this little piece of shader code stalls the application
 10         vec4 pnoise = texture2D(normalmap,gl_TexCoord[0].st);
 11         float f= pnoise.r*0.0625 + pnoise.g*0.125 + pnoise.b*0.25 + pnoise.a*0.5;
 12
 13 //      pos.z =f;
 14         //pos.z = sin(pos.x*pos.y)*0.05+pos.z;
 15         pos.z += pnoise.r;

The textures work fine in the fragment program, the lookup doesn t stall the application if I don t use the result either, but as soon as I comment in line 15: the program hangs and I get no error message. Any idea whats wrong here? Mipmapping is off, and GL_NEAREST is used for filtering. thx for your help in advance

Share this post


Link to post
Share on other sites
Advertisement
I dont know about Open GL but in HLSL you must use the tex2Dlod() to sample a texture in a vertex shader..Also the texture must be floating point

Share this post


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

  • Advertisement