I’m using transform feedback to generate primitives in a geometry shader, and then reading those back onto the CPU RAM.
The number of points emitted by the geometry shader is variable. The only way I can think of doing it is to compute all my input points at once in one shader call. To determine how many emitted points per input, there is a sentinel value to signify the end of the points, like one uses NULL at the end of a C-style char array. The sentinel value will be (inf, inf, inf, inf).
Do you know of a better way to do this?
the code is at
https://github.com/sjhalayka/julia_via_geometry_shader