You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We chose tangent and cotangent vectors based on the normal vector to form an LCS. For calculating the tangent vector we use the following function, defined in mathutils.h file:
m_u and m_v are used in texturing getTextureCoords() and in the calculation of the derivatives of the primitive's surface over its parametrization parameters u and v dp()
They are used to calculate the points lying on the circumference
CShaderOrenNayar
In the BRDF function, we create an LCS at the shading point to transform light ingoing and outgoing directions to LCS with a transformation matrix M:
// transfer to the local coordinate system Vec3f t = tangent(n); Vec3f s = n.cross(t); Matx33f M ( t[0], t[1], t[2], s[0], s[1], s[2], n[0], n[1], n[2] );