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