Is it possible to have multi shaders on the same Node?

Hi, My question might be stupid so excuse me if so.
Anyway, I was playing around with shaders GLSL shaders, and what I noticed is whenever I apply a custom shader to my node the setShaderAuto() is no more has effects on that node, it seems it got replaced.
So I guess we can apply just one single shader to the node?

because I wanted to apply a custom shader that do the textures mapping and I didn’t want to lose the advantage of using AutoShader which is useful for shadow casting, (I believe creating custom shader for shadow casting is not easy task, since am a newbie in 3D and).

So what you thing? how I can use the autoSader beside my custom shader?

I think you can render the shadows to a buffer, and your effect to another buffer and overlay each other with the multiplication mode.

https://docs.panda3d.org/1.10/python/programming/render-to-texture/generalized-image-filters

However, I can’t explain it in more detail, I haven’t experimented with combining buffers.

1 Like

Unfortunately, a shader describes the entire process of shading an object, so it is not possible to combine two shaders.

You can use dump-generated-shaders to dump the shaders that Panda generates, but it is not a GLSL shader.

1 Like