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

Fix text shadow outline draw batching. #103471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Mar 2, 2025

Fixes #103464

Drawing shadow outline for all glyphs first, instead of drawing both shadow and shadow outline for each glyph, seems to be almost 2x faster. Also removes some unnecessary shadow related processing from RTL.

@bruvzg bruvzg added this to the 4.5 milestone Mar 2, 2025
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. The shadow outline must be breaking batching (does it use a different texture?), reordering the draws allows Godot to render this in 2 draw calls and saves a ton of resources.

@bruvzg
Copy link
Member Author

bruvzg commented Mar 2, 2025

does it use a different texture?

Yes, outline is always in a different texture.

@bruvzg bruvzg marked this pull request as ready for review March 2, 2025 17:21
@bruvzg bruvzg requested a review from a team as a code owner March 2, 2025 17:21
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label Shadow Performance Problem
3 participants