summaryrefslogtreecommitdiff
path: root/common/shaders/render/fullscreen_vs.wgsl
blob: 507b892930079f1df5b7c71adf394c13c4910093 (plain)
1
2
3
4
5
6
7
8
9
10
// Common vertex shader for fullscreen post-processing effects.
// Draws a single triangle that covers the entire screen.
@vertex fn vs_main(@builtin(vertex_index) i: u32) -> @builtin(position) vec4f {
    var pos = array<vec2f, 3>(
        vec2f(-1, -1),
        vec2f( 3, -1),
        vec2f(-1,  3)
    );
    return vec4f(pos[i], 0.0, 1.0);
}