Page 1 of 1

Basis Construction with Tangent Vector

Posted: Mon Feb 12, 2018 7:59 pm
by josh247
Wanted to post this simple example for constructing an orthonormal basis that takes two vectors, and uses SIMD instructions. There are a couple of great papers (http://jcgt.org/published/0006/01/01/ and http://jcgt.org/published/0006/01/02/) on the subject which came out recently. These however just take a normal vector and do not accept a tangent that can be used for anisotropic distributions.

Couldn't find an implementation that uses SIMD instructions online, so thought this might be helpful for someone. If you run the program it gives a comparison of a standard implementation and the vectorised equivalent.

https://github.com/joshbainbridge/ortho ... gent-basis