diff --git a/shader/fine.wgsl b/shader/fine.wgsl index 7b298ca..f7b3404 100644 --- a/shader/fine.wgsl +++ b/shader/fine.wgsl @@ -138,7 +138,7 @@ fn fill_path(tile: Tile, xy: vec2) -> array { } // nonzero winding rule for (var i = 0u; i < PIXELS_PER_THREAD; i += 1u) { - area[i] = abs(area[i]); + area[i] = min(abs(area[i]), 1.0); } return area; } @@ -169,6 +169,7 @@ fn stroke_path(seg: u32, half_width: f32, xy: vec2) -> array, @@ -179,7 +180,7 @@ fn main( let xy = vec2(f32(global_id.x * PIXELS_PER_THREAD), f32(global_id.y)); #ifdef full var rgba: array, PIXELS_PER_THREAD>; - var blend_stack: array, PIXELS_PER_THREAD>; + var blend_stack: array, BLEND_STACK_SPLIT>; var clip_depth = 0u; var area: array; var cmd_ix = tile_ix * PTCL_INITIAL_ALLOC;