summaryrefslogtreecommitdiffstats
path: root/wgpu/src/quad
diff options
context:
space:
mode:
authorLibravatar Nick Senger <dev@nsenger.com>2023-11-08 19:12:53 -0800
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-20 11:59:37 +0100
commitcc906c83cdf896d94b7ccf91258466714be631f6 (patch)
treead873e88cb711d4f186cb0c83497329903c200c3 /wgpu/src/quad
parentb3e3f6e3c9fc6879e6681810f54d7eaa7c0f3d30 (diff)
downloadiced-cc906c83cdf896d94b7ccf91258466714be631f6.tar.gz
iced-cc906c83cdf896d94b7ccf91258466714be631f6.tar.bz2
iced-cc906c83cdf896d94b7ccf91258466714be631f6.zip
feat: quad shadows
Diffstat (limited to '')
-rw-r--r--wgpu/src/quad.rs9
-rw-r--r--wgpu/src/quad/solid.rs6
2 files changed, 15 insertions, 0 deletions
diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs
index 4bcf9a66..cda1bec9 100644
--- a/wgpu/src/quad.rs
+++ b/wgpu/src/quad.rs
@@ -201,6 +201,15 @@ pub struct Quad {
/// The border width of the [`Quad`].
pub border_width: f32,
+
+ /// The shadow color of the [`Quad`].
+ pub shadow_color: [f32; 4],
+
+ /// The shadow offset of the [`Quad`].
+ pub shadow_offset: [f32; 2],
+
+ /// The shadow blur radius of the [`Quad`].
+ pub shadow_blur_radius: f32,
}
/// A group of [`Quad`]s rendered together.
diff --git a/wgpu/src/quad/solid.rs b/wgpu/src/quad/solid.rs
index 90e7f98e..771eee34 100644
--- a/wgpu/src/quad/solid.rs
+++ b/wgpu/src/quad/solid.rs
@@ -105,6 +105,12 @@ impl Pipeline {
4 => Float32x4,
// Border width
5 => Float32,
+ // Shadow color
+ 6 => Float32x4,
+ // Shadow offset
+ 7 => Float32x2,
+ // Shadow blur radius
+ 8 => Float32,
),
}],
},