In GLSL functions, the parameter evaluation strategy is call by value-return (also called call by copy-restore or call by value-result). Parameter variables can be qualified with in, out, or inout. Arguments corresponding to input parameters (those qualified with in or inout) are copied into the parameter variable at call time, and output parameters (those qualified with out or inout) are copied back to the corresponding argument before the function returns. If a parameter variable does not have any of the three qualifiers, the default qualifier is in.
We've created two functions in the vertex shader. The first, named getCamSpace, transforms the vertex position and vertex normal into camera coordinates, and returns them via ...