Hi,
I’m trying to understand the matrix transformations that happen to a vertex coordinate(as outputted by the vertex shader, say at Cg binding POSITION), before it enters the fragment shader (say, at Cg binding WPOS). I’m not interested in the way the rasterizer works in terms of filling primitives with fragments etc, so assume GL_POINTs. Assuming the vertex shader multiplies its incoming vertex coordinate by the ModelView matrix, how would you simulate the transformation of a single vertex coordinate from then on (in terms of the Perspective matrix and the viewport dimensions etc) ? Pseudo-code (like ‘mul(M, V)’ would be great).
Any help would be greatly appreciated. Thanks.