mirror of
https://github.com/italicsjenga/vello.git
synced 2024-10-18 07:21:30 +11:00
28082af9ec
Adds blend group alpha. Also changes the clip logic to sync blend mode and alpha from BeginClip to EndClip in clip_leaf.
22 lines
327 B
WebGPU Shading Language
22 lines
327 B
WebGPU Shading Language
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
|
|
|
|
struct Bic {
|
|
a: u32,
|
|
b: u32,
|
|
}
|
|
|
|
fn bic_combine(x: Bic, y: Bic) -> Bic {
|
|
let m = min(x.b, y.a);
|
|
return Bic(x.a + y.a - m, x.b + y.b - m);
|
|
}
|
|
|
|
struct ClipInp {
|
|
ix: u32,
|
|
path_ix: i32,
|
|
}
|
|
|
|
struct ClipEl {
|
|
parent_ix: u32,
|
|
bbox: vec4<f32>,
|
|
}
|