I am trying to figure out a way to get the Fragment Shader to output a list of
I want to use the GPU to get a list of vertices in the viewing frustum.
Is there any way I can get a per fragment shader invocation variable or something else that is possible to use as a pointer to a texture? If it is not possible, is there a possibility to use a sparse texture to render to, using
gl_VertexID-s as a pointer?.
I will be rendering about a million or two vertices at a time (using
GL_POINTS), and the list should be tightly packed to be of use. Some work may be offloaded to the CPU, but this is part of a real-time render engine so the execution times need to be under 10ms.
I am using OpenGL 4.4.