Is there a easier (or straight forward) way to implement the multiple lights like the firefly demo?

Hey, everyone, I have been playing around with the lighting of panda3d, and while it is cool, it is vary taxing on my system, and I have read around there is a light limit, I checked the firefly demo, and it works on my system, and it has a ton of lights.

It is using something called “Deferred Shading” and it is using it’s own shader, I was wondering if I can implement this technique using something more simpler like auto shader, it was way too complicated for me right now, and I ask because this demo was created in 2005, and wonder if panda3d by now has a streamlined process of this?

Many thanks to those who wish to help.

You can take a look at:


However, there are limitations for point light sources in terms of shadows.

Of course, there is a perfect render, but it is demanding.

The closest thing to a drop in solution for handling many light’s is the RenderPipeline by tobspr that @serega-kkz already linked. Panda does not have anything built in for handling many lights and neither does simplepbr.

Then it turns out the max_lights parameter is misleading. If it has a maximum value of 8, then it doesn’t make much sense. It is worth noting that this rule applies to a single object, not to the scene.

thanks, are they as quick as the firefly demo, because normal lighting is not bad, but it’s hecka slow for me, especially when clearing or turning a light off in real time, I find much quicker to move it away or set it’s color to 0.

Also, I was wondering if it can be done without a custom shader (shader file), but it seems that may not be the case, I wanted to know, because are these just are complex to setup as the firefly demo?

I still cannot figure out what is really happening in that code, so I wanted avoid custom shaders because of that.

so only custom shaders (shader files)? are the ones posted just as complex to setup as the one in the firefly demo? because it is it’s complexity in that demo that makes me want to avoid custom shaders.

So I looked at couple of youtube videos on deferred shading, and it seems from what I got from it, is one or couple of powerful lights are used and shined on the objects to give their lighted states, but it is not actually seen.

The best I can describe it is in 2d terms, like a special “light layer” that the player does not see, but instead of 2d stencils slapping on the stenciled portion of the unseen layer onto the main screen, it is done three dimensionally.

With 3d stencils blending (or overlay) the light layer 3d space portion over the main screen 3d space in that 3d spot so it perceives to give off light, many lights if you want, when only actually one or couple of real lights are used.

I,am wondering if this is the case, maybe there can be more simpler solution then.