Skip to main content

MAIN

Constant MAIN 

Source
pub const MAIN: &str = "\n@compute @workgroup_size(8, 8)\nfn main(@builtin(global_invocation_id) id: vec3<u32>) {\n    let dst_dim = textureDimensions(dst_tex);\n    let scissor = post.region.z != 0u;\n    let p = select(id.xy, id.xy + post.region.xy, scissor);\n    if (scissor && (p.x >= post.region.z || p.y >= post.region.w)) { return; }\n    if (p.x >= dst_dim.x || p.y >= dst_dim.y) { return; }\n    if (post.size.x != 0u && (p.x >= post.size.x || p.y >= post.size.y)) { return; }\n    let src = load_src(vec2<i32>(p));\n";