Skip to main content

URL_WGSL_BODY

Constant URL_WGSL_BODY 

Source
pub const URL_WGSL_BODY: &str = r"
@compute @workgroup_size(64)
pub fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
    let offset = gid.x;
    if (offset + 2u >= params.input_len || read_byte(offset) != 37u) { return; }
    let hi = hex_value(read_byte(offset + 1u));
    let lo = hex_value(read_byte(offset + 2u));
    if (hi == 0xffffffffu || lo == 0xffffffffu) { return; }
    emit_region(offset, 3u, 1u, ((hi << 4u) | lo) & 0xffu, 0u, 0u);
}
";
Expand description

URL_WGSL_BODY constant.