Convert colors to linear RGB in gradient pipelines
This commit is contained in:
parent
6246584209
commit
9a02d60ba5
2 changed files with 13 additions and 12 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue