bevy/crates/bevy_text/src
François 4e2600b788 text rendering: convert colours only once per section (#5474)
# Objective

- Improve performance when rendering text

## Solution

- While playing with example `many_buttons`, I noticed a lot of time was spent converting colours
- Investigating, the biggest culprit seems to be text colour. Each glyph in a text is an individual UI node for rendering, with a copy of the colour. Making the conversion to RGBA linear only once per text section reduces the number of conversion done once rendering.
- This improves FPS for example `many_buttons` from ~33 to ~42
- I did the same change for text 2d
2022-07-28 13:34:56 +00:00
..
error.rs Fix errors and panics to typical Rust conventions (#968) 2020-12-02 11:31:16 -08:00
font.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
font_atlas.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
font_atlas_set.rs Updated glam to 0.21. (#5142) 2022-07-03 19:55:33 +00:00
font_loader.rs Add support for OTF fonts (#1200) 2021-01-03 12:10:23 -08:00
glyph_brush.rs Move Size to bevy_ui (#4285) 2022-04-25 13:54:46 +00:00
lib.rs Update layout/style when scale factor changes too (#4689) 2022-05-09 14:18:02 +00:00
pipeline.rs Updated glam to 0.21. (#5142) 2022-07-03 19:55:33 +00:00
text.rs Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
text2d.rs text rendering: convert colours only once per section (#5474) 2022-07-28 13:34:56 +00:00