The input to my vertex shader is a six-channel framebuffer object packed with the 3D coordinates of the endpoints of line segments(two RGB textures).
On the host, I’m generating a single quad per line segment using the conventional glBegin()/glEnd(). Each of the quad has the same position and orientation.
And I need a vertex program to position the vertices of the quads relative to those line segments, so that each quad has the same orientation as the corresponding line-segment.
The fragment program then textures the quads with a 2D pen texture to archieve the effect of NPR. So how to compute the vertex positions?
Your help is greatly appreciated