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
Show-off, reference material & tools.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests