bevy/crates/bevy_ui_render/src
ickshonpe 5ea0e4004f
HSL and HSV interpolation for UI gradients (#19992)
# Objective

Add interpolation in HSL and HSV colour spaces for UI gradients.

## Solution
Added new variants to `InterpolationColorSpace`: `Hsl`, `HslLong`,
`Hsv`, and `HsvLong`, along with mix functions to the `gradients` shader
for each of them.

#### Limitations
* Didn't include increasing and decreasing path support, it's not
essential and can be done in a follow up if someone feels like it.

* The colour conversions should really be performed before the colours
are sent to the shader but it would need more changes and performance is
good enough for now.

## Testing

```cargo run --example gradients```
2025-07-07 20:08:51 +00:00
..
box_shadow.rs Use RenderStartup in bevy_ui. (#19901) 2025-07-05 04:07:23 +00:00
box_shadow.wgsl
debug_overlay.rs
gradient.rs HSL and HSV interpolation for UI gradients (#19992) 2025-07-07 20:08:51 +00:00
gradient.wgsl HSL and HSV interpolation for UI gradients (#19992) 2025-07-07 20:08:51 +00:00
lib.rs Use RenderStartup in bevy_ui. (#19901) 2025-07-05 04:07:23 +00:00
pipeline.rs Use RenderStartup in bevy_ui. (#19901) 2025-07-05 04:07:23 +00:00
render_pass.rs
ui_material_pipeline.rs Use RenderStartup in bevy_ui. (#19901) 2025-07-05 04:07:23 +00:00
ui_material.rs
ui_material.wgsl
ui_texture_slice_pipeline.rs Use RenderStartup in bevy_ui. (#19901) 2025-07-05 04:07:23 +00:00
ui_texture_slice.wgsl
ui_vertex_output.wgsl
ui.wgsl