• Advertisement
Sign in to follow this  

dot3 bump mapping

This topic is 4839 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

Every tutorial i've seen of bump mapping explains basics of bumpmapping static objects (like the one in dxsdk)! What about object that is rotating? Any link on this subject or explanation would help! I guess i have to recompute binormals & tangents in vs but... i'm not shure how.

Share this post


Link to post
Share on other sites
Advertisement
you have to transform the normal and tangent in the vertex shader, then you compute the binormal with the cross product.
normals (and tangents) are transformed using a 3x3 matrix, because they are directions, not positions, and so they only have to rotate. so to rotate the normal or tangent in world space you do something like:


;v3 = model space normal/tangent
;c0-c3 = world matrix

dp3 r0.x,v3,c0
dp3 r0.y,v3,c1
dpe r0.z,v3,c2

Share this post


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

  • Advertisement