summaryrefslogtreecommitdiff
path: root/test_passthrough.wgsl
diff options
context:
space:
mode:
Diffstat (limited to 'test_passthrough.wgsl')
-rw-r--r--test_passthrough.wgsl10
1 files changed, 10 insertions, 0 deletions
diff --git a/test_passthrough.wgsl b/test_passthrough.wgsl
new file mode 100644
index 0000000..1e5f52a
--- /dev/null
+++ b/test_passthrough.wgsl
@@ -0,0 +1,10 @@
+@vertex fn vs_main(@builtin(vertex_index) i: u32) -> @builtin(position) vec4<f32> {
+ var pos = array<vec2<f32>, 3>(
+ vec2<f32>(-1.0, -1.0), vec2<f32>(3.0, -1.0), vec2<f32>(-1.0, 3.0)
+ );
+ return vec4<f32>(pos[i], 0.0, 1.0);
+}
+
+@fragment fn fs_main(@builtin(position) p: vec4<f32>) -> @location(0) vec4<f32> {
+ return vec4<f32>(1.0, 0.0, 0.0, 1.0); // Solid red
+}