Real-Time 3D Graphics with WebGL 2
上QQ阅读APP看书,第一时间看更新

The in and out variables

These keywords describe the direction of the input and output. As seen with the attribute and varying declarations, when we use in, that variable is supplied to the shader. When we use out, the shader exposes that variable. Let's see how these keywords are used in earlier versions of WebGL within the vertex and fragment shader.