I was reading chapter 4 of the Arcsyntesis OpenGL tutorial when I came across this line in the GLSL shader.
vec4 cameraPos = position + vec4(offset.x, offset.y, 0.0, 0.0);
About it, the tutorial says
The first statement simply applies the offset to get the camera space positions of the vertices.
I understand what cameraPos is but I don't get what the offset is. It's defined as a uniform and it's passed to the shader by the main program like this:
glUniform2f(offsetUniform, 1.5f, 0.5f);
So offset.x = 1.5f and offset.y = 0.5f. But I see no mention of that offset in the rest of the tutorial and its values seem quite random to me. I know that the offset from the projection plane to the eye is always -1 but that refers to a value of Z. Where do X and Y come from? Are they arbitrary values? What they mean, what they do? I understood everything up to the point but I can find no reference to said offset in the tutorial and I'd like to know if someone can explain it to me, please.
Edit: the last line I posted was probably forgotten by the author of the tutorial and can be find in the book's source distribution here.