Hi,
I’m trying to use a rain effect with geometry shader. Basically it should work like this:
1 - Draw VBO1 (only GL_POINTS)
2 - In vertex shader make animation (based on wind, position…)
3 - Store the new position via feedback transform to VBO2
4 - In geometry shader create from 1 point a billboard with 4 vertices
5 - In fragment shader render the billboard with a texture on in
6 - swap VBO2 to VBO1
The question is: what is the best way to swap data between 2 VBO’s? So far only options came up to my mind:
- for loop (this just does not sound correct)
- ‘rebind’ the buffers - this does not sound very much correct either
any comments more than appreciated