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

Text2d and nine-slicing is broken #17098

Closed
rparrett opened this issue Jan 2, 2025 · 4 comments · Fixed by #17123
Closed

Text2d and nine-slicing is broken #17098

rparrett opened this issue Jan 2, 2025 · 4 comments · Fixed by #17123
Labels
A-Rendering Drawing game state to the screen A-Text Rendering and layout for characters C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Milestone

Comments

@rparrett
Copy link
Contributor

rparrett commented Jan 2, 2025

Bevy version

main, bisected to #17078

Relevant system information

SystemInfo { os: "macOS 14.5 Sonoma", kernel: "23.5.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" }
AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

What you did

cargo run --example text2d

What went wrong

It seems that only one glyph per entity gets drawn.

Image
@rparrett rparrett added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jan 2, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Jan 2, 2025
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-Text Rendering and layout for characters and removed S-Needs-Triage This issue needs to be labelled labels Jan 2, 2025
@alice-i-cecile
Copy link
Member

FYI @superdump

@BenjaminBrienen BenjaminBrienen added P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Investigation This issue requires detective work to figure out what's going wrong labels Jan 2, 2025
@ickshonpe
Copy link
Contributor

ickshonpe commented Jan 2, 2025

It's extracting every glyph sprite for the same text entity with the same key so they all get overwritten except the last glyph.

#17041 would fix this.

@BenjaminBrienen BenjaminBrienen added S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! and removed S-Needs-Investigation This issue requires detective work to figure out what's going wrong labels Jan 2, 2025
@ickshonpe
Copy link
Contributor

ickshonpe commented Jan 2, 2025

Nine slicing should be broken too.

yep:
Image

@alice-i-cecile alice-i-cecile changed the title Text2d is broken Text2d and nine-slicing is broken Jan 2, 2025
@ickshonpe
Copy link
Contributor

ickshonpe commented Jan 2, 2025

This also broke multi-window, it seems to ignore the camera targets or whatever and draw the sprites to every view.

multi-window sprite rendering was already broken

False alarm, spent ages earlier trying to understand the latest UI camera changes and forgot that we use RenderLayers not TargetCamera for sprites 😓

github-merge-queue bot pushed a commit that referenced this issue Jan 4, 2025
…#17078)" (#17123)

# Objective

Fixes #17098

It seems that it's not totally obvious how to fix this, but that
reverting might be part of the solution anyway.

Let's get the repo back into a working state.

## Solution

Revert the [recent
optimization](#17078) that broke
"many-to-one main->render world entities" for 2d.

## Testing

`cargo run --example text2d`
`cargo run --example sprite_slice`
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 A-Text Rendering and layout for characters C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
4 participants