   About Vertex Texture Fetching in profile VP_40!HELP!
  I've being trying to access a texture data in a vertex shader for days now and I couldn't get it done.I've looked up everything and done everything I was told.Like I've set up a RGBAfloat32 texture,and I've tried both "tex2d" and "tex2Dlod" func..But obviously my shader just could read the texture properly.But when I set the exact same texture to a fragment shader,it works perfectly well.I just really can't find out what I'm missing.I'm trying to displace the water surface.The texture is generated on the fly based on the height of the surface using FBO.I'm using CG and OGL in cases that matters.Here's my code...Any help would be really appreciated.Here is the format of the texture.glGenTextures(1, &texID);glBindTexture(GL_TEXTURE_2D,texID);if(isHeightMap == true)glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, width, height, 0, GL_RGBA, GL_FLOAT, 0);My vertex shader:uniform float4x4 modelViewProj : state.matrix.mvp;const float fieldSize = 256;const float invl = 1/(fieldSize-1);void main(float4 iPosition : POSITION,float2 iTexCoord : TEXCOORD0,out float4 oPosition : POSITION,out float3 objectPos : TEXCOORD1,out float4 viewCoord : TEXCOORD2,out float3 oNormal : TEXCOORD3,out float2 oTexCoord : TEXCOORD4,uniform sampler2D heightMap){float2 mapCoord = iPosition.xz * invl;float4 height = tex2D(heightMap, mapCoord);float4 h1 = tex2D(heightMap, mapCoord.xy+float2(invl, 0));float4 h2 = tex2D(heightMap, mapCoord.xy+float2(-invl, 0));float4 h3 = tex2D(heightMap, mapCoord.xy+float2(0, invl));float4 h4 = tex2D(heightMap, mapCoord.xy+float2(0, -invl));oPosition = float4(iPosition.x, height.y, iPosition.z, 1);float3 pos1 = float3(iPosition.x+1, h1.y, iPosition.z);float3 pos2 = float3(iPosition.x-1, h2.y, iPosition.z);float3 pos3 = float3(iPosition.x, h3.y, iPosition.z+1);float3 pos4 = float3(iPosition.x, h4.y, iPosition.z-1);float3 n1 = cross(pos1-oPosition.xyz, pos3-oPosition.xyz);float3 n3 = cross(pos2-oPosition.xyz, pos4-oPosition.xyz);oNormal = -float3(0.5*(normalize(n1)+normalize(n3)));objectPos = oPosition;oPosition = mul(modelViewProj, oPosition);viewCoord = oPosition;oTexCoord = iTexCoord;}And how I set the texture parameter.cgGLSetTextureParameter(cgGetNamedParameter(cgRipplePresentVert,"heightMap"),HF.heightMap.texID);cgGLEnableTextureParameter(cgGetNamedParameter(cgRipplePresentVert,"heightMap"));can anyone show me what I'm missing!?!?I'm sure the shader is being executed...because I've manually change the height,and it worked..
  Being that this is the DirectX forum, I think you're in the wrong place to get help with OpenGL.   