All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Common.ShaderLib.Tangent.glsllib Maven / Gradle / Ivy

The newest version!
uniform mat3 g_NormalMatrix;

void Tangent_ComputeVS(out vec3 outNormal, out vec3 outTangent){
    outNormal = normalize(g_NormalMatrix * inNormal);
    outTangent = normalize(g_NormalMatrix * inTangent);
}

mat3 Tangent_GetBasis(){
    vec3 wvBinormal = cross(wvNormal, wvTangent);
    return mat3(wvTangent, wvBinormal, wvNormal);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy