Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprite example broken after #12582: Divide the single VisibleEntities list #12935

Closed
mgi388 opened this issue Apr 12, 2024 · 1 comment · Fixed by #12945
Closed

Sprite example broken after #12582: Divide the single VisibleEntities list #12935

mgi388 opened this issue Apr 12, 2024 · 1 comment · Fixed by #12945
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Comments

@mgi388
Copy link
Contributor

mgi388 commented Apr 12, 2024

Bevy version

The release number or commit hash of the version you're using.

5caf085 (from #12582)

Relevant system information

INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 14.2.1 ", kernel: "23.2.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" }
INFO bevy_render::renderer: AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
INFO bevy_winit::system: Creating new window "App" (Entity { index: 0, generation: 1 })

What you did

$ RUST_BACKTRACE=full MTL_HUD_ENABLED= cargo run --example sprite

What went wrong

Looks like this:

image

Additional information

Works before this commit on 5c3ae32:

$ git checkout 5c3ae32ab
$ RUST_BACKTRACE=full MTL_HUD_ENABLED= cargo run --example sprite
image
@mgi388 mgi388 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 12, 2024
@mgi388 mgi388 changed the title Sprite example broken after #12582: Divide the single VisibleEntities Sprite example broken after #12582: Divide the single VisibleEntities list Apr 12, 2024
@pablo-lua pablo-lua added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Apr 12, 2024
@pcwalton
Copy link
Contributor

#12945 is a fix

github-merge-queue bot pushed a commit that referenced this issue Apr 13, 2024
`Sprite`, `Text`, and `Handle<MeshletMesh>` were types of renderable
entities that the new segregated visible entity system didn't handle, so
they didn't appear.

Because `bevy_text` depends on `bevy_sprite`, and the visibility
computation of text happens in the latter crate, I had to introduce a
new marker component, `SpriteSource`. `SpriteSource` marks entities that
aren't themselves sprites but become sprites during rendering. I added
this component to `Text2dBundle`. Unfortunately, this is technically a
breaking change, although I suspect it won't break anybody in practice
except perhaps editors.

Fixes #12935.

## Changelog

### Changed

* `Text2dBundle` now includes a new marker component, `SpriteSource`.
Bevy uses this internally to optimize visibility calculation.

## Migration Guide

* `Text` now requires a `SpriteSource` marker component in order to
appear. This component has been added to `Text2dBundle`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants