bevyengine / bevyengine/bevy

9-Slices don't update when using RenderAssetUsages::RENDER_WORLD

Open
#13,316 2 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.