# OpenGL parallax mapping

This topic is 5269 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

When calculating the u,v offsets: u' = (height*scale + bias)*Ex + u = height*scale*Ex + bias*Ex + u = (height, 1, 1) dot (scale*Ex, bias*Ex, u) v' = (height*scale + bias)*Ey + v = height*scale*Ey + bias*Ey + v = (height, 1, 1) dot (scale*Ey, bias*Ey, v) What are scale, bias, Ex, Ey? (taken from http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011292;p=4)

##### Share on other sites
scale is a scaling factor to make the height value correlating with the actual height to displace the pixel.

bias is simply an extra bit of height to apply to every pixel.

Ex,Ey is the eye vectior in tangent space.

##### Share on other sites
How do I convert the eye vector to tangent space? Similar to how I convert the light normal to tangent space from the tangent, bitangent and normal (in the vertex shader that does normal mapping?)

##### Share on other sites
convert the eye vector to tangent space using the inverse of the TBN (Tangent, Binormal, Normal) matrix, made up of these three vectors. In fact its inverse will be equal to its transpose, since it is a rotation matrix.

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 30
• 9
• 16
• 22