mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-11 05:11:16 +00:00
11e30583cf
While I have trouble imagining it making that much performance difference going from 4 verts to 3 for a whopping 2 polygons, or even from 2 triangles to 1 for each poly, using only indices for the vertices does remove a lot of code, and better yet, some memory and buffer allocations... always a good thing. That said, I guess freeing up a GPU thread for something else could make a difference.
9 lines
183 B
GLSL
9 lines
183 B
GLSL
#version 450
|
|
|
|
void
|
|
main ()
|
|
{
|
|
float x = (gl_VertexIndex & 2);
|
|
float y = (gl_VertexIndex & 1);
|
|
gl_Position = vec4 (2, 4, 0, 1) * vec4 (x, y, 0, 1) - vec4 (1, 1, 0, 0);
|
|
}
|