See https://discourse.panda3d.org/t/multi-pass-rendering-setinitialstate-wont-apply-shader/25712
@@ -4148,6 +4148,7 @@ end_frame(Thread *current_thread) {
_current_shader = nullptr;
_current_shader_context = nullptr;
}
+ _state_shader = nullptr;
#endif
// Respecify the active texture next frame, for good measure.