I currently implemented a two pass algorithm for cel shading.
The second pass draw back facing triangles in Line mode with a LineWidth of 5.0
So FPS slow up to 50% if GL_LINE is used.
evertyhing run fine if GL_FILL used.
So my CPU is about 10% of use when two passes with fill, and 100% when second pass is Line mode.
May be GL_LINE polygon mode is software?
Has anyone an info about that?
Is there a way to draw outlines in cel-shading without these back facing polygon artifacts?
I think that on most consumercards lines are implemented as quads, so you get 2 triangles ( and a 50% slowdown) when using them. And in linemode (if my assumption is correct) you need to billboard the lines, and you get a much higher CPU usage
I’ve known about the polygon trick, even ‘high end’ sgi systems have done this, but come on. Surely not all on the CPU, and there’s no need to billboard per se. It’s x&y after projection, the only issue might be pre homogeneous divide expansion of x&y depending on the implementation.
Even if this wasn’t supported in hardware, you’d at least simply generate the required quad vertices on the host and use a vertex program for the quad coordinate displacement. You may require some setup created on the CPU to cue the VP.
[This message has been edited by dorbie (edited 07-18-2003).]