I use an OpenGL shader to plot graphs. Every span of the graph has the form:
The vertex shader just passes the a's and b's to a geometry shader that then evaluates the curve at max_vertices
points.
The problem is that sometimes the geometry shader seems to become "overloaded" and stops spitting out points:
Both curves actually have the exact same values, but for some reason the bottom one has some kind of failure of the geometry shader to generate points.
When I change max_vertices
in the following line of my geometry shader:
layout (triangle_strip, max_vertices = ${max_vertices}) out;
from 1024 (the result of gl.glGetInteger(gl.GL_MAX_GEOMETRY_OUTPUT_VERTICES)
) to 256, then I get the desired output:
What is happening? What is the true maximum number of vertices? Why is the top graph unaffected, but the bottom one corrupted? They have the same data.