mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-12-04 04:38:02 +00:00
9 lines
281 B
WebGPU Shading Language
9 lines
281 B
WebGPU Shading Language
// This snapshot tests accessing various containers, dereferencing pointers.
|
|
|
|
[[stage(vertex)]]
|
|
fn foo([[builtin(vertex_index)]] vi: u32) -> [[builtin(position)]] vec4<f32> {
|
|
let array = array<i32, 5>(1, 2, 3, 4, 5);
|
|
let value = array[vi];
|
|
return vec4<f32>(vec4<i32>(value));
|
|
}
|