   How is Vertex Texture Fetching used in GL with CG exactly!?Pls help me.....
  I've been working my ass off these days to try to use the displacement mapping on my water surface....But I think my code is perfectly correct,the surface just dont get displaced...I m really upset about these now..Pls help,here is how I've done it.First I render the height texture used for displacement on the fly,which is in GL_RGBAF32 format. I've checked by displaying the texture,and the result is correct,so the texture is correctly rendered.Then I set the texture parameter,by callingcgGLSetTextureParameter(cgGetNamedParameter(cgRipplePresentVert,"heightMap"),HF.heightMap.texID);cgGLEnableTextureParameter(cgGetNamedParameter(cgRipplePresentVert,"heightMap"));And in my vertex shader,my texture is declared as below.uniform sampler2D heightMap;and then I sample the texture by calling:float4 height = tex2D(heightMap, mapCoord);But the displacement just doesnt happen...!!I've tried everything I can.I tried change to use the tex2Dlod too,and it wont work.I'm sure the shader is being executed..When I change the height manually,it worked.And my vedio card is GS8400,with profile VP40,which should perfectly support this VTF feature....So can anyone tell me what I've done wrong...T.T   
  are you sending the uniform correctly?   ;  I also used to handle textures in cg using cgGLEnableTextureParameter. However, I found a bug in cg regarding textures used in the vertex shader (this is some time ago, I used cg 1.5 and do not remember all the details).I switched to manual handling of texture units, and that solved my problem. I suggest trying something like this:// Activate texturesglActiveTextureARB( GL_TEXTURE0_ARB );glEnable( GL_TEXTURE_2D ); // Not sure if this is really neededglBindTexture( GL_TEXTURE_2D, HeightDataBuffer );glActiveTextureARB( GL_TEXTURE1_ARB );glEnable( GL_TEXTURE_2D );glBindTexture( GL_TEXTURE_2D, FoamTexture );.....and then in the shader:void OceanVertexShader( uniform sampler2D HeightData : TEXUNIT0,.....;Quote:Original post by dpadam450are you sending the uniform correctly?I think I am...I'm sending using:cgGLSetTextureParameter(cgGetNamedParameter(cgRipplePresentVert,"heightMap"),HF.heightMap.texID);cgGLEnableTextureParameter(cgGetNamedParameter(cgRipplePresentVert,"heightMap"));Is this okay?It works perfectly for my fragment shader.   ;Quote:Original post by stalefI also used to handle textures in cg using cgGLEnableTextureParameter. However, I found a bug in cg regarding textures used in the vertex shader (this is some time ago, I used cg 1.5 and do not remember all the details).I switched to manual handling of texture units, and that solved my problem. I suggest trying something like this:*** Source Snippet Removed ***and then in the shader:*** Source Snippet Removed ***Thank you...I tried and it didn't work...glActiveTexture(GL_TEXTURE0);glEnable(GL_TEXTURE_2D);HF.heightMap.bind();and uniform sampler2D heightMap:TEXUNIT0The shader still doesn't get the vertex data....Oh I'm devastated...   