identity.wgsl11 lines · 301 B · raw
1const VERTICES: array<vec4f, 4> = array(
2    vec4f(-1.0, -1.0, 0.0, 1.0),
3    vec4f(1.0, -1.0, 0.0, 1.0),
4    vec4f(-1.0, 1.0, 0.0, 1.0),
5    vec4f(1.0, 1.0, 0.0, 1.0),
6);
7
8@vertex
9fn vs_main(@builtin(vertex_index) vertex_index: u32) -> @builtin(position) vec4f {
10    return VERTICES[vertex_index];
11}