add higher-level app library

Fixes hexops/mach#190

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-04-04 22:47:31 -07:00 committed by Stephen Gutekanst
parent 38095942d9
commit 49f80de6ab
7 changed files with 586 additions and 10 deletions

10
examples/vert.wgsl Normal file
View file

@ -0,0 +1,10 @@
@stage(vertex) fn main(
@builtin(vertex_index) VertexIndex : u32
) -> @builtin(position) vec4<f32> {
var pos = array<vec2<f32>, 3>(
vec2<f32>( 0.0, 0.5),
vec2<f32>(-0.5, -0.5),
vec2<f32>( 0.5, -0.5)
);
return vec4<f32>(pos[VertexIndex], 0.0, 1.0);
}