Hi,
I need to function to transform vectors between world and tangent space.
I found this:
http://www.chaosgroup.com/forums/vbu...ight=bitangent
From the sample code, I wrote this function:
Is the matrix I get from this function a pure rotation matrix?
I ask because it transforms my unit vectors into non-unit which doesn't seem right.
Thanks!
I need to function to transform vectors between world and tangent space.
I found this:
http://www.chaosgroup.com/forums/vbu...ight=bitangent
From the sample code, I wrote this function:
Code:
Matrix worldToTangent(const VRayContext& rc) { MappedSurface* mappedSurf = (MappedSurface*) GET_INTERFACE(rc.rayresult.sd, EXT_MAPPED_SURFACE); return mappedSurf->getLocalUVWTransform(rc, 0).m; }
I ask because it transforms my unit vectors into non-unit which doesn't seem right.
Thanks!
Comment