Common.ShaderLib.Common.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
vec3 Common_UnpackNormal(in vec3 norm){
return (norm * vec3(2.0)) - vec3(1.0);
}
vec3 Common_UnpackNormalLA(in vec4 norm){
vec3 newNorm = norm.agb;
newNorm.b = sqrt(1.0 - (newNorm.x * newNorm.x) - (newNorm.y * newNorm.y));
return (newNorm * vec3(2.0)) - vec3(1.0);
}
vec3 Common_PackNormal(in vec3 norm){
return (norm * vec3(0.5)) + vec3(0.5);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy