CONSOLE :: shader.wgsl :: live
esc · cmd+enter to run
01 @vertex
02 fn vs(@builtin(vertex_index) i: u32) ->
03 @builtin(position) vec4f {
04 let a = f32(i) * 2.094;
05 return vec4f(cos(a), sin(a), 0., 1.);
06 }
07
08 @fragment
09 fn fs() -> @location(0) vec4f {
10 return vec4f(.49, .98, 1., 1.); // cyan
11 }
✓ compiled · 0 errors
✓ pipeline created
▸ rendering @ 60fps