SHADER_POST_PROCESSING_VERTEX

Constant SHADER_POST_PROCESSING_VERTEX 

Source
pub const SHADER_POST_PROCESSING_VERTEX: &str = "// meant to be called with 3 vertex indices: 0, 1, 2\r\n// draws one large triangle over the clip space like this:\r\n// (the asterisks represent the clip space bounds)\r\n//-1,1           1,1\r\n// ---------------------------------\r\n// |              *              .\r\n// |              *           .\r\n// |              *        .\r\n// |              *      .\r\n// |              *    . \r\n// |              * .\r\n// |***************\r\n// |            . 1,-1 \r\n// |          .\r\n// |       .\r\n// |     .\r\n// |   .\r\n// |.\r\n@vertex\r\nfn vs_main(@builtin(vertex_index) vertex_index: u32) -> VertexOutput {\r\n    var result: VertexOutput;\r\n    let x = i32(vertex_index) / 2;\r\n    let y = i32(vertex_index) & 1;\r\n    let tc = vec2<f32>(\r\n        f32(x) * 2.0,\r\n        f32(y) * 2.0\r\n    );\r\n    result.position = vec4<f32>(\r\n        tc.x * 2.0 - 1.0,\r\n        1.0 - tc.y * 2.0,\r\n        0.0, 1.0\r\n    );\r\n    result.tex_coords = tc;\r\n    return result;\r\n}\r\n\r\nstruct VertexOutput {\r\n    @builtin(position) position: vec4<f32>,\r\n    @location(0) tex_coords: vec2<f32>,\r\n}\r\n\r\n@group(0) @binding(0)\r\nvar r_color: texture_2d<f32>;\r\n@group(0) @binding(1)\r\nvar r_sampler: sampler;\r\n\r\n// TODO: unify this with frag-shader-prefix to avoid dupes\r\n\r\n@group(0) @binding(0)\r\nvar t_diffuse: texture_2d<f32>;\r\n@group(0)@binding(1)\r\nvar s_diffuse: sampler;\r\n";