Originally Posted By: Hummel
Have you done some stability testing? As far as I remember, the old ShaderX4 version wasn't that stable.
No. To be honest, I forgot the handedness of the precomputed tangent frame which is stored in the tangent .w component and tried this approach instead - and it worked in an instant! After I noticed the missed handedness factor (to be multiplied with the crossed' binormal) I switched back to precomupted tangents and skipped the pixelshader approach because of improved performance.

Originally Posted By: Hummel
shouldn't this be ... instead?
Hm. I did it that way because position- and direction vectors are for me always XYZ... why should I use the full homogenous transform? However, I see no noticeable difference if I use the full 4x4 homogenous transform and cast back to the XYZ vector. And last but not least, in the default.fx the world matrix is being casted to a 3x3, too, if a XYZ vector is passed. So.. I guess this shouldn't be too wrong, I guess smile

Last edited by HeelX; 04/06/13 18:32.