It's strange. I have
vout.PosW.y = gHeightMap.SampleLevel( samHeightmap, float3(x,z,0.0f), 0 ).r;
height map is 4096x4096 grayscale image.
What numbers should be in x,z-range?
I try with
PosW.x/4096
PosW.z/4096
when posw <4096 and posw>0 I always get same result, posw is random number. I tried test with vertexID and InstanceID, no matter what I write to x,z I always have same result. I tried with other textures but without any effect.