mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
24 lines
431 B
WebGPU Shading Language
24 lines
431 B
WebGPU Shading Language
struct Vertex {
|
|
@location(0) position: vec2f
|
|
}
|
|
|
|
struct NoteInstance {
|
|
@location(1) position: vec2f
|
|
}
|
|
|
|
struct VertexOutput {
|
|
@builtin(position) position: vec4f
|
|
}
|
|
|
|
@vertex
|
|
fn vs_main(vertex: Vertex, note: NoteInstance) -> VertexOutput {
|
|
var out: VertexOutput;
|
|
return out;
|
|
}
|
|
|
|
@fragment
|
|
fn fs_main(in: VertexOutput, note: NoteInstance) -> @location(0) vec4f {
|
|
let position = vec3(1f);
|
|
return in.position;
|
|
}
|