Two different scenarios, both of which exhibit the problem:
Scenario 1: Thumbnail generator
I have a main camera which is targeting the window; it's viewing a scene that has a directional light and various models. All of these items are on renderlayer 2.
I spawn a second camera to generate thumbnail images, which targets an Image. This camera also has a directional light and a model. These are all on renderlayer 1.
Whenever the second camera is active, the shadows on the first camera disappear. If I set the second camera is_active to false, then the first camera shadows re-appear. If I delete the directional light for the second camera, the shadows also re-appear.
Scenario 2: Portals
This scenario is similar to the first, except that there's only one render layer: camera 2 is the remote portal camera, but is viewing the same scene, with the same lights, as camera 1.
My portal system only spawns camera 2 when a portal is within the view frustum, and despawns it otherwise.
What I see is that when a portal comes on-screen, the shadows on the main camera disappear.
Bevy version
0.14.0
What went wrong
Two different scenarios, both of which exhibit the problem:
Scenario 1: Thumbnail generator
I have a main camera which is targeting the window; it's viewing a scene that has a directional light and various models. All of these items are on renderlayer 2.
I spawn a second camera to generate thumbnail images, which targets an Image. This camera also has a directional light and a model. These are all on renderlayer 1.
Whenever the second camera is active, the shadows on the first camera disappear. If I set the second camera is_active to false, then the first camera shadows re-appear. If I delete the directional light for the second camera, the shadows also re-appear.
Scenario 2: Portals
This scenario is similar to the first, except that there's only one render layer: camera 2 is the remote portal camera, but is viewing the same scene, with the same lights, as camera 1.
My portal system only spawns camera 2 when a portal is within the view frustum, and despawns it otherwise.
What I see is that when a portal comes on-screen, the shadows on the main camera disappear.