Calculating Tangent Space
In order to find the perturbation in the normal the tangent space must be correctly calculated. Most often the normal is perturbed in a fragment shader after applying the model and view matrices. Typically the geometry provides a normal and tangent. The tangent is part of the tangent plane and can be transformed simply with the linear part of the matrix (the upper 3x3). However, the normal needs to be transformed by the inverse transpose. Most applications will want cotangent to match the transformed geometry (and associated uv's). So instead of enforcing the cotangent to be perpendicular to the tangent, it is generally preferable to transform the cotangent just like the tangent. Let t be tangent, b be cotangent, n be normal, M3x3 be the linear part of model matrix, and V3x3 be the linear part of the view matrix.
Read more about this topic: Normal Mapping
Famous quotes containing the words calculating and/or space:
“Sin in this country has been always said to be rather calculating than impulsive.”
—Frank Moore Colby (18651925)
“True spoiling is nothing to do with what a child owns or with amount of attention he gets. he can have the major part of your income, living space and attention and not be spoiled, or he can have very little and be spoiled. It is not what he gets that is at issue. It is how and why he gets it. Spoiling is to do with the family balance of power.”
—Penelope Leach (20th century)