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

Remove camera from UiBatch #17663

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Feb 3, 2025

Objective

A TransparentUI phase's items all target the same camera so there is no need to store the current camera entity in UiBatch and ending the current UiBatch on camera changes is pointless as the camera doesn't change.

Solution

Remove the camera fields from UiBatch, UiShadowsBatch and UiTextureSliceBatch.
Remove the camera changed check from prepare_uinodes.

Testing

The multiple_windows and split_screen examples both render UI elements to multiple cameras and can be used to test these changes.

The UI material plugin already didn't store the camera entity per batch and worked fine without it.

@ickshonpe ickshonpe added A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change C-Performance A change motivated by improving speed, memory usage or compile times labels Feb 3, 2025
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-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant