diff --git a/shader/path_tiling.wgsl b/shader/path_tiling.wgsl index 1e5ea17a4..abfa4475d 100644 --- a/shader/path_tiling.wgsl +++ b/shader/path_tiling.wgsl @@ -122,9 +122,9 @@ fn main( } // See comments in CPU version of shader var y_edge = 1e9; - if xy0.x == tile_xy.x { + if xy0.x == tile_xy.x && xy1.x != tile_xy.x && xy0.y != tile_xy.y { y_edge = xy0.y; - } else if xy1.x == tile_xy.x { + } else if xy1.x == tile_xy.x && xy1.y != tile_xy.y { y_edge = xy1.y; } if !is_down { diff --git a/src/cpu_shader/path_tiling.rs b/src/cpu_shader/path_tiling.rs index 56bc2b47a..6b8a9413e 100644 --- a/src/cpu_shader/path_tiling.rs +++ b/src/cpu_shader/path_tiling.rs @@ -118,12 +118,11 @@ fn path_tiling_main( if !is_down { (xy0, xy1) = (xy1, xy0); } - // TODO: figure out what to if both xy0 and xy1 are at left edge - // Also TODO (part of move to 8 byte encoding for segments): don't store y_edge at all, + // TODO (part of move to 8 byte encoding for segments): don't store y_edge at all, // resolve this in fine. - let y_edge = if xy0.x == tile_xy.x { + let y_edge = if xy0.x == tile_xy.x && xy1.x != tile_xy.x && xy0.y != tile_xy.y { xy0.y - } else if xy1.x == tile_xy.x { + } else if xy1.x == tile_xy.x && xy1.y != tile_xy.y { xy1.y } else { 1e9