<<< GLSL built-in functions | Index | GLSL common functions >>> |
Overloaded for all vecN data types:
float length (vec x); float distance (vec p0, vec p1); float dot (vec x, vec y); vec3 cross (vec x, vec y); vec normalize (vec x); vec reflect (vec I, vec N); // I is incident vector (light/view) and N is normal vec refract(vec I, vec N, float eta); vec faceForward (vec N, vec I, vec nRef);// if dot(Nref, I) < 0, return N, else return -N
<<< GLSL built-in functions | Index | GLSL common functions >>> |