I’ve been experimenting with parallax, maping yesterday, but faced some problems.
What I’ve been doing was:
2nd: draw geometry stage + passing tangent, binormal, normal to vp
3rd: passing eyepos, + MVP,MV,MVIT matrices to cg vp
4th: cg vp -> mul(mvit,eyepos), E=eyepos-IN.pos, mul(TBN, E)
5th: cg fp, fetch height from texture, normalize E, use the function to calculate offset offset=(h*E.xy/E.z)
The problem seems to be connected with transformations, as the texture appears to rotate vhen crossing some point (moving with gluLookAt)