So as a part of learning OpenGL, I've now decided to try and be a bit more creative with shaders, as part of a practice game I'm making using C/OpenGL.
I'm completely new when it comes to working with shaders, so I'm still trying to get used to the thought process behind creating something with it. To this extend, here's what I want to attempt.
As a part of the gameplay, the entire background of the game consists of a white, plain, 2D texture. The white texture should slowly animate black circles into it over time, until finally the entire texture is completely black.
I've considered some different approaches to the problem, and would like to know which one will be the most practical when it comes to shaders.
Using framebuffers: As I've understood from looking around the internet, you can't really, say, apply certain colors to a specific area of fragments in your fragment shader (like creating a black circle), and then save the state of those fragments for the next frame. Instead, I would have to apply the effect, and render the texture to a framebuffer and then re-use it again the next frame. I could then continuously do this slowly add black circles to the texture. The problem is, is this really too much work to do for something simple as this? Or would it be fast enough? As far as I've seen, framebuffers are usually used to post-process effects for entire scene frames. This would not be for the entire scene, only for the background. The advantage of this approach would be that it's relatively simply to work with as you're only working on one texture.
Creating individual circle objects with own fragment shaders: This was another approach I thought about doing. Basically, instead of having one shader work on the entire background texture, I would simply spawn textured quads that each individually run a fragment shader that just turns their texture black over time using a simple percentage value input as a uniform. The disadvantage of this solution is that you make it a bit more complex by having to handle more objects at runtime, instead of simply working with one texture. More vertices would also have to be handled when rendering.
Of these two approaches, I don't know really what would be a good solution to run with. I would like to use the framebuffers approach but I don't know if I would "abuse" the technique with this kind of problem or not.
Or perhaps there's another way of doing this that I've completely missed because I'm new to shaders, in that case other suggestions would be welcome!
Thank you all for your help :)