diff options
Diffstat (limited to 'cpp-timeplot/shaders/waterfall.wgsl')
| -rw-r--r-- | cpp-timeplot/shaders/waterfall.wgsl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cpp-timeplot/shaders/waterfall.wgsl b/cpp-timeplot/shaders/waterfall.wgsl new file mode 100644 index 0000000..6655301 --- /dev/null +++ b/cpp-timeplot/shaders/waterfall.wgsl @@ -0,0 +1,22 @@ +struct VertexInput { + @location(0) position: vec2<f32>, + @location(1) color: vec3<f32>, +} + +struct VertexOutput { + @builtin(position) clip_position: vec4<f32>, + @location(0) color: vec3<f32>, +} + +@vertex +fn vs_main(in: VertexInput) -> VertexOutput { + var out: VertexOutput; + out.clip_position = vec4<f32>(in.position, 0.0, 1.0); + out.color = in.color; + return out; +} + +@fragment +fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> { + return vec4<f32>(in.color, 1.0); +} |
