summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wgpu/src/triangle/gradient.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/wgpu/src/triangle/gradient.rs b/wgpu/src/triangle/gradient.rs
index 92c176af..6698bb4e 100644
--- a/wgpu/src/triangle/gradient.rs
+++ b/wgpu/src/triangle/gradient.rs
@@ -168,14 +168,13 @@ impl Pipeline {
let stops: Vec<ColorStop> = linear
.color_stops
.iter()
- .map(|stop| ColorStop {
- offset: stop.offset,
- color: Vec4::new(
- stop.color.r,
- stop.color.g,
- stop.color.b,
- stop.color.a,
- ),
+ .map(|stop| {
+ let [r, g, b, a] = stop.color.into_linear();
+
+ ColorStop {
+ offset: stop.offset,
+ color: Vec4::new(r, g, b, a),
+ }
})
.collect();