libgdx / box2dlights

Fork of box2dlights by Kalle Hamalainen
Apache License 2.0
256 stars 82 forks source link

[FREQ] Blending w/ ParticleEffects? #88

Open adam-law opened 9 years ago

adam-law commented 9 years ago

I'm not sure if blending is the proper term for it, but I've noticed that, due to the ambient light, box2dlights draws a "dim" layer on top of everything, evident in areas where there is no light. Particle effects that are running in the background, and drawn before the call to RayHandler.updateAndRender(), are overlaid by this layer, and I assume other visual effects are as well. Of course, drawing the effects after the box2dlights will render the effect above the dimness, and be unaffected by it.

It would be great (only if possible) if the rendering process accounts for the existence of these effects, and somehow "illuminates" the effect's surrounding area (better yet, using the effect's dominant color); effectively drawing through the dim layer, regardless if the effect was drawn before or after box2dlight's update and render method.