9-Slices don't update when using RenderAssetUsages::RENDER_WORLD
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
22305acf660486554fe6276e580e65a910b9e2df
## What you did
Run sprite_tile example, change texture asset usage to RENDER_WORLD.
```rs
SpriteBundle {
texture: asset_server.load_with_settings("branding/icon.png", |settings: &mut ImageLoaderSettings| {
settings.asset_usage = RenderAssetUsages::RENDER_WORLD
}),
..default()
}
```
## What went wrong
Example animation never updates
## Additional information
[Slices are computed in main world](https://github.com/bevyengine/bevy/blob/main/crates/bevy_sprite/src/lib.rs#L116-L117) and it's not documented anywhere that it requires the image in main world. I think it's fair to say that this should be done in render world.
Contributor guide
Research direction
Start with the sprite_tile example and the slice computation in crates/bevy_sprite/src/lib.rs around lines 116-117. Reproduce the issue with RenderAssetUsages::RENDER_WORLD, then trace how the image and slice data move between the main and render worlds. Done means the animation updates correctly with that usage, or the required main-world usage is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100