Initial commit
This commit is contained in:
commit
3516d6b906
10 changed files with 2648 additions and 0 deletions
11
tests/shader.wgsl
Normal file
11
tests/shader.wgsl
Normal file
|
@ -0,0 +1,11 @@
|
|||
@vertex
|
||||
fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) vec4<f32> {
|
||||
let x = f32(i32(in_vertex_index) - 1);
|
||||
let y = f32(i32(in_vertex_index & 1u) * 2 - 1);
|
||||
return vec4<f32>(x, y, 0.0, 1.0);
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fs_main() -> @location(0) vec4<f32> {
|
||||
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue