Advanced shadows with shader generator ?

When I enabled render.setShaderAuto() in Advanced shadows sample everything went bonkers. No shadows, Panda flying somewhere in the air. Is it possible to use shadows from advanced mapping together with shader generator? If not, what options there are for shadows with shader generator enabled?

That’s because you can’t mix “normal” shaders (i.e, ones defined in a .sha or .cg file) with ones generated by Panda’s shader generation pipeline. IIRC, this is going to be fixed in Panda 2, but nobody really knows when that’s going to be released.

To get around this, you could either use Panda’s built-in shadow mapping implementation (which don’t work on Intel GPUs), or write your own shaders that replace Panda’s auto-generated ones.

Apparently, you actually can. I never knew that. When you’re setting shader you need to specify stage of the shader so that it would work after shader generator finished what it was doing.

For example: np.setShader(Shader.load(“shadow.sha”), 1)

Correct me if I am wrong. However, everything is working fine now.

That’s going to write over any work the shader generator does on that node, so I’m not sure if that’s going to look very pretty. You’re completely right though :slight_smile:

You’re right, I just tested it and normal mapping doesn’t work.

Depending on whether you’ll actually use the shader generator, that might not be important. Regardless, Panda 2.0’s shader generator will be able to work with user-generated shaders, so we’ll just have to wait a little while for that functionality :slight_smile: