file structure

This commit is contained in:
2023-09-16 10:32:16 +02:00
parent 2d22de28b9
commit 4d95a873b0
3 changed files with 3 additions and 3 deletions

11
shaders/shader.wgsl Normal file
View 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);
}