Shadow maps are not rendered on the first frame
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
3827316100845a00eba90c3623709f06c8de27ad
```ignore
AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
```
## What you did
Started up one of the built in examples (e.g. `3d_scene`)
## What went wrong
Shadows were not visible for the first frame.
## Additional information
**Discord Link:** https://discord.com/channels/691052431525675048/743663924229963868/1045464392877224006
tl;dr:
- @alice-i-cecile pointed out that this is likely a system ordering issue;
- @djeedai had coincidentally pointed out right before that [light views are seemingly being extracted in the prepare phase instead of extract phase](https://discord.com/channels/691052431525675048/743663924229963868/1045446071947636837) and that this could be the specific cause of this ~~single frame delay~~; Edit: Maybe unrelated? See comment below
- ~~This likely also means that for _moving_ light sources the view the shadow map is rendered from will be one frame behind, potentially producing strange results.~~ Edit: This is not the case, just confirmed.
Video of me scrubbing footage from an example from #6412 (but this happens to other examples that have shadows as well)
https://user-images.githubusercontent.com/418473/203872986-4dedbc79-fcf5-44d2-b6d6-2aa20e22b39a.mov
Contributor guide
Assessment
This issue has not been assessed yet.