Sup folks! It’s been a while
So with this whole corona quarantine going on, I’ve decided to take a few weeks off from work to pick up a game I’ve been working on last year. I’m currently in the process of building a pure GPU particle engine, which works pretty well so far.
Now I remember something in the past about threejs (or WebGL in general) not dealing with dynamically adding/removing lights to a scene very well. I was wondering if someone has figured out a way to do this efficiently by now? I’ve been searching the internet for the past few hours (including the forums), but to no avail unfortunately.
To be specific:
- I already have a particle system in-place (using a set of custom vertex shaders that utilize interleaved buffer geometries).
- I’m trying to add a light-source that lives for a second or two for those “one-off” particle effects (explosions for example).
The lightning effects of this video describe the kind of effect I’m trying to achieve (I’m talking purely about the lightning, not the particle effects): https://www.youtube.com/watch?v=-oJCBLuf5I8
What is the most efficient (and easy) way to add and remove light sources?
I know there are “workarounds” to get a similar effect (billboards,sprites, etc.), but I wanted see if anyone else has some ideas about this, before I start implementing “the ususal methods”.
Thanks in advance!