It displays lots of dots. In any case, the projection matrix is the directrix. Obviously I have a bit more work to do on it and clean up the useless bits but it certainly possible to do non-linear projection.
My triangle is stretched like a SOB.
Need to modify it.
It obviously works.
Code:
varying vec4 colour; void main(){ vec3 vertex; vec3 focus; vec3 pointDirectrix; vec3 pointOnPorabola; float dstVertexToDirectrix; vertex = vec3(0.0, 0.0, 0.0); pointDirectrix = vec3(gl_ModelViewProjectionMatrix * gl_Vertex); dstVertexToDirectrix = length(vertex - pointDirectrix); focus = vec3(0.0, 0.0, 2.0 * dstVertexToDirectrix); pointOnPorabola = vec3(0.0); pointOnPorabola.x = (pointDirectrix.y * pointDirectrix.y) / (4.0 * dstVertexToDirectrix * pointDirectrix.x); pointOnPorabola.y = sqrt(4.0 * dstVertexToDirectrix * pointDirectrix.x); gl_Position = vec4(pointOnPorabola, gl_Vertex.w); colour = gl_Color; }
My triangle is stretched like a SOB.
Need to modify it.
It obviously works.