Shader Instancing example does not render additional instanced entites with respect to their Transforms
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
The release number or commit hash of the version you're using.
* v0.13.2 (aa80e2d658ed1b84787fd512839a8c84238979ef)
* also tested on 257fec996fedfe8e3757b11720eb2ab8a21fbbb5 (currently latest `main`)
## Relevant system information
```ignore
SystemInfo { os: "Linux 21.2 Linux Mint", kernel: "5.15.0-91-generic", cpu: "AMD Ryzen 5 5600X 6-Core Processor", core_count: "6", memory: "23.4 GiB" }
AdapterInfo { name: "NVIDIA GeForce GTX 1050 Ti", vendor: 4318, device: 7298, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "535.129.03", backend: Vulkan }
```
## What you did
In the `shader_instancing` example, I added a second entity with `InstanceMaterialData`, with it's `Transform` translated away from the origin.
## What went wrong
When rendering the second `InstanceMaterialData` entity, it's `Transform` is not respected (ie. it is rendered at the origin). If the original entity is despawned or made not visible, the second entity is now correctly rendered based on its `Transform`.
### What were you expecting?
Each `InstanceMaterialData` entity should each be rendered with respect to its own `Transform`.
### What actually happened?
Only one of the entities is rendered with respect to its `Transform`, the other is not.
## Additional information
Here is a modified `shader_instancing` example I put together showcasing this bug: https://github.com/DavidHospital/bevy/tree/shader-instancing-demo. Simply run `cargo run --example shader_instancing`.
Contributor guide
Assessment
This issue has not been assessed yet.