frenchtoast747 / webgl-obj-loader

A simple OBJ model loader to help facilitate the learning of WebGL.
http://frenchtoast747.github.io/webgl-obj-loader/
MIT License
281 stars 59 forks source link

Add support for calculating tangents and bitangents #47

Closed novalain closed 6 years ago

novalain commented 6 years ago

With the existing support for .mtl files it would make sense for the library to calculate the tangents and bitangents as an option. These are later needed for calculating the TBN matrix when dealing with normal maps.

The tangents and bitangents are derived from the vertices positions and (most commonly) the direction of the texture coordinates.

frenchtoast747 commented 6 years ago

Closing as completed, thanks to @michaelnoven!