stk-code_catmod/data/shaders/utils/encode_normal.frag
2014-03-21 18:10:54 +01:00

5 lines
128 B
GLSL

// from Crytek "a bit more deferred CryEngine"
vec2 EncodeNormal(vec3 n)
{
return normalize(n.xy) * sqrt(n.z * 0.5 + 0.5);
}