Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


World space to tangent space


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Jeason   Members   -  Reputation: 96

Like
0Likes
Like

Posted 02 March 2012 - 02:52 AM

// Normalize the light and view vectors and transform it to the tangent space:
    float3x3 mWorldToTangent = float3x3( vTangentWS, vBinormalWS, vNormalWS );

// Propagate the view and the light vectors (in tangent space):
    Out.vViewTS  = mul( mWorldToTangent, vViewWS  );
    Out.vLightTS = mul( vLightWS, mWorldToTangent );




vLightWS, vViewWS is the lgith vector and view vector in world space.

My question is that the last two line codes are doing the same operation but with inverse order to multiply matrix. I think the last is wrong, but the program runs well. Why?

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS