1 uniform mat3 g_NormalMatrix; 2 3 void Tangent_ComputeVS(out vec3 outNormal, out vec3 outTangent){ 4 outNormal = normalize(g_NormalMatrix * inNormal); 5 outTangent = normalize(g_NormalMatrix * inTangent); 6 } 7 8 mat3 Tangent_GetBasis(){ 9 vec3 wvBinormal = cross(wvNormal, wvTangent); 10 return mat3(wvTangent, wvBinormal, wvNormal); 11 } 12