I am rendering sprites in 3d space, where each quad is formed with two triangles. I draw GL_TRIANGLES (see below). Since 2 vertices are repeated in this formation, vertex shader does two times the same computation.
5 3, 4
*---*
| /|
|/ |
*---*
1, 6 2
I wanted to optimize this by using a geometry shader to repeat the two vertices. The reason for this is that the vertex shader is expensive and there is a high number of triangles in the scene. After a lot of hackery, I managed to pull it off. It turned off to be very inefficient. It is actually 45% slower on my machine. I assume that this comes from the fact that primitive assembly is performed two times and a lot unnecessary data copying happens in the geometry shader. I can't view the assembly code so I can only guess.
Now to my question, is there a better way of doing this that would actually be faster than doing all the extra vertex shader operations.