mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
6f7d0e5725
# Objective Currently text is recomputed unnecessarily on any changes to its color, which is extremely expensive. ## Solution Split up `TextStyle` into two separate components `TextFont` and `TextColor`. ## Testing I added this system to `many_buttons`: ```rust fn set_text_colors_changed(mut colors: Query<&mut TextColor>) { for mut text_color in colors.iter_mut() { text_color.set_changed(); } } ``` reports ~4fps on main, ~50fps with this PR. ## Migration Guide `TextStyle` has been renamed to `TextFont` and its `color` field has been moved to a separate component named `TextColor` which newtypes `Color`. |
||
---|---|---|
.. | ||
animate_shader.rs | ||
array_texture.rs | ||
automatic_instancing.rs | ||
compute_shader_game_of_life.rs | ||
custom_phase_item.rs | ||
custom_post_processing.rs | ||
custom_shader_instancing.rs | ||
custom_vertex_attribute.rs | ||
extended_material.rs | ||
fallback_image.rs | ||
gpu_readback.rs | ||
shader_defs.rs | ||
shader_material.rs | ||
shader_material_2d.rs | ||
shader_material_glsl.rs | ||
shader_material_screenspace_texture.rs | ||
shader_prepass.rs | ||
specialized_mesh_pipeline.rs | ||
storage_buffer.rs | ||
texture_binding_array.rs |