mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-08 20:01:30 +11:00
ff59839737
* Move the vello crate to the root of the crate * Add warning that README is work in progress * Add newline in warning * Move the unlicense into the shader folder * Fixup wgsl-analyzer include paths
26 lines
620 B
WebGPU Shading Language
26 lines
620 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 {
|
|
// Index of the draw object.
|
|
ix: u32,
|
|
// This is a packed encoding of an enum with the sign bit as the tag. If positive,
|
|
// this entry is a BeginClip and contains the associated path index. If negative,
|
|
// it is an EndClip and contains the bitwise-not of the EndClip draw object index.
|
|
path_ix: i32,
|
|
}
|
|
|
|
struct ClipEl {
|
|
parent_ix: u32,
|
|
bbox: vec4<f32>,
|
|
}
|