View Full Version : Parallax mapping troubles :(

02-09-2004, 02:16 AM
I've been experimenting with parallax, maping yesterday, but faced some problems.

What I've been doing was:
1st: gluLookAt
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)

02-09-2004, 07:07 AM
Moving to the Advanced forum.