Jump to content
  • Advertisement
Sign in to follow this  
XBoy

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!