Update simple.wgsl to latest syntax

This commit is contained in:
Timo de Kort
2020-12-10 23:21:41 +01:00
parent b7744a1ec5
commit 6a6e3c28f9
2 changed files with 12 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
(
spv_capabilities: [ Shader ],
mtl_bindings: { }
)

View File

@@ -1,8 +1,13 @@
# vertex
[[builtin position]] var<out> o_position : vec4<f32>;
[[builtin(position)]] var<out> o_position : vec4<f32>;
[[stage(vertex)]]
fn main() -> void {
o_position = vec4<f32>(1);
o_position = vec4<f32>(1.0, 1.0, 1.0, 1.0);
if (1 == 1) {
var a: f32 = 1.0;
}
return;
}
entry_point vertex as "main" = main;