pub const CHESSBOARD: &str = "// Port of gl-transitions/transitions/chessboard.glsl\n// Author: lql\n// License: MIT\n// alpha2: the wipe inside each cell is antialiased; the checker\'s own borders stay hard.\nfn gl_transition(uv: vec2f) -> vec4f {\n let st = uv * params.grid_num;\n // The unwrapped coordinate\'s footprint: fract\'s wrap at a cell border is no edge.\n let width = max(fwidthFine(st.x), 0.0000001);\n let idx = floor(st);\n let grid = fract(st);\n let checker = builtin_floor_mod(idx.x + idx.y, 2.0);\n let first = progress() <= 0.5;\n let t = select((progress() - 0.5) * 2.0, progress() * 2.0, first);\n // Upstream\'s step(grid.x, t), whole at t = 1 so the cell\'s far border stays covered.\n let wipe = select(clamp(0.5 + (t - grid.x) / width, 0.0, 1.0), 1.0, t >= 1.0);\n let amount = select(select(1.0, wipe, checker < 0.5), select(0.0, wipe, checker > 0.5), first);\n return mix(gl_from_color(uv), gl_to_color(uv), amount);\n}\n";Expand description
Checkerboard wipe transition body.