I was stumped for a while why your code would be creating a shadow buffer at all, since nothing is using the shadows, but then I realised that set_shader_auto(False)
is enabling the shader generator, and that False just gets converted to a priority value of 0. This isn’t the right way to disable it, but if you did disable it, the shadow buffers would not get created.
Your Config.prc variables are not taking effect because by escaping the newline, all those lines end up on the same line. You should use a multi-line string literal with """
.
However, the actual problem seems to be related to the new light culling system, which is behaving correctly, but it’s more sensitive to sorting issues. You currently have all your lights set to render their shadows after the main window, which causes Panda to think that there is actually no scene pass depending on the result of rendering the shadow maps, and therefore it can cull the lights.
If you set the sort values of the lights to negative values, then it works. That incidentally solves the problem of the shadows being delayed by 1 frame compared to the rest of the scene.