Common.ShaderLib.Tangent.glsllib Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jme3-core Show documentation
Show all versions of jme3-core Show documentation
jMonkeyEngine is a 3-D game engine for adventurous Java developers
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