vello/piet-wgsl/shader/shared/cubic.wgsl
Raph Levien 3c0752f6ae Fix rendering artifacts with strokes
A number of things weren't being computed correctly for strokes,
including bounding boxes and also incorrectly applying y_edge logic
(which is only correct for fills).
2022-11-26 16:51:22 -08:00

14 lines
237 B
WebGPU Shading Language

// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
struct Cubic {
p0: vec2<f32>,
p1: vec2<f32>,
p2: vec2<f32>,
p3: vec2<f32>,
stroke: vec2<f32>,
path_ix: u32,
flags: u32,
}
let CUBIC_IS_STROKE = 1u;