bevy/examples/shader
ickshonpe 6f7d0e5725
split up TextStyle (#15857)
# 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`.
2024-10-13 17:06:22 +00:00
..
animate_shader.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
array_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
automatic_instancing.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
compute_shader_game_of_life.rs Remove the Component trait implementation from Handle (#15796) 2024-10-09 21:10:01 +00:00
custom_phase_item.rs Type safe retained render world (#15756) 2024-10-10 18:47:04 +00:00
custom_post_processing.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
custom_shader_instancing.rs Type safe retained render world (#15756) 2024-10-10 18:47:04 +00:00
custom_vertex_attribute.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
extended_material.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
fallback_image.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
gpu_readback.rs Gpu readback (#15419) 2024-09-30 17:28:55 +00:00
shader_defs.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
shader_material.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
shader_material_2d.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
shader_material_glsl.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
shader_material_screenspace_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
shader_prepass.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
specialized_mesh_pipeline.rs Type safe retained render world (#15756) 2024-10-10 18:47:04 +00:00
storage_buffer.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
texture_binding_array.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00