'Automatic shader generator' and my own shaders


I have been playing around with Panda’s latest feature, the ‘automatic shader generator’, and I have a few questions.
I am trying to implement a really simple procedural texture shader and I would like to use it together with the ‘automatic shader’ features from panda (glow, bloom, …). Is there a way to mix the two?

I have never seen an ‘automatic shader generator’ before, but from what I could learn reading the ShaderGenerator.cxx code, it returns an object that contains all the Cg code necessary to run the effects. Could I insert my shader code there? Or is there a better way?

The manual only mentions that you have to extend the ShaderGenerator class, but there is no example. :frowning:


p.s.: sorry for my poor english.

And I posted it under the wrong forum. Sorry about that.
I would be grateful if any admin moved the topic.

The problem is that there is no straightforward way to combine two shaders. So I really haven’t figured out any way to combine the shader generator’s output with manually-written stuff, short of just making your own shader generator.

The good news is that making your own shader generator probably isn’t that hard. You’d copy the existing shader generator code, change the class name, and then make a few modifications.

But, of course, it would require you to dig into the C++ code, which is a bit daunting for a lot of people.