1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 21:00:03 -04:00

Add RectShape::blur_width to implement shadows (#4267)

This is mostly a refactor, but has some performance benefits:
* We (re)use the same tessellator as for everything else, leading to
less allocations
* We cull shapes before rendering them

Adding `RectShape::blur_width` means it can also be used for other
effects, such as glow.
This commit is contained in:
Emil Ernerfeldt
2024-03-29 20:29:42 +01:00
committed by GitHub
parent 73dbfd689b
commit a541e021aa
7 changed files with 62 additions and 51 deletions

View File

@@ -37,6 +37,7 @@ pub fn adjust_colors(shape: &mut Shape, adjust_color: &impl Fn(&mut Color32)) {
rounding: _,
fill,
stroke,
blur_width: _,
fill_texture_id: _,
uv: _,
})