A. We use interpolation whenever we have data specified at the vertices of a triangle, and we want to figure out the corresponding data at a point within the triangle. So far, we have interpolated RGB colors and ST texture coordinates. But our triRender function is set up to interpolate entire varying vectors, which can hold arbitrary data (as long as they begin with XY).
B. At each rasterized fragment x, we use linear algebra to compute two numbers p, q that express how far into the triangle that point x is relative to one of the vertices. Those p, q are then coefficients in the interpolation. More specifically, the interpolated x is computed from the varying a, b, c by
x = a + p (b - a) + q (c - a).
C. The fragment shader is called by triRender after interpolation and before the depth test. It takes as input the uniforms, the varyings, and the textures. It produces as output an RGB color and a depth D. We can customize the fragment shader to generate many artistic coloration effects, and its control over the depth offers additional flexibility, for example in our spaceship-masking example from class.
D. The vertex shader is called by meshRender just before triRender is called. It takes as input the uniforms and the attributes. It produces as output the varyings. We can customize the vertex shader to perform many transformations of the attribute data, including rotating and translating the vertex positions, transforming the texture coordinates, etc.
E. The sky is a sphere, large enough to contain the entire scene including the camera. It is texture-mapped with an image of clouds on blue. Because the camera is inside the sky sphere, we are seeing the sky sphere triangles from the inside. We should see none of them, because they should be backface-culled. So something has been done to change that. Either triRender has been altered to cull front faces instead of back faces, or the mesh has been altered so that each triangle presents clockwise when viewed from outside and counterclockwise when viewed from inside. (By the way, it's the latter.)