gpu: update example shader @stage(vertex) -> @vertex

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-11 17:08:19 -07:00 committed by Stephen Gutekanst
parent c5b565d0ce
commit 6357f3a767

View file

@ -38,7 +38,7 @@ pub fn main() !void {
window_data.target_desc = descriptor; window_data.target_desc = descriptor;
const vs = const vs =
\\ @stage(vertex) fn main( \\ @vertex fn main(
\\ @builtin(vertex_index) VertexIndex : u32 \\ @builtin(vertex_index) VertexIndex : u32
\\ ) -> @builtin(position) vec4<f32> { \\ ) -> @builtin(position) vec4<f32> {
\\ var pos = array<vec2<f32>, 3>( \\ var pos = array<vec2<f32>, 3>(
@ -57,7 +57,7 @@ pub fn main() !void {
}); });
const fs = const fs =
\\ @stage(fragment) fn main() -> @location(0) vec4<f32> { \\ @fragment fn main() -> @location(0) vec4<f32> {
\\ return vec4<f32>(1.0, 0.0, 0.0, 1.0); \\ return vec4<f32>(1.0, 0.0, 0.0, 1.0);
\\ } \\ }
; ;