18 lines
392 B
WebGPU Shading Language
18 lines
392 B
WebGPU Shading Language
struct VertexOutput {
|
|
@builtin(position) position: vec4f,
|
|
@location(0) color: vec4f,
|
|
}
|
|
|
|
@vertex
|
|
fn vertex(@location(0) position: vec4f, @location(1) color: vec4f) -> VertexOutput {
|
|
var output: VertexOutput;
|
|
output.position = position;
|
|
output.color = color;
|
|
return output;
|
|
}
|
|
|
|
@fragment
|
|
fn fragment(@location(0) color: vec4f) -> @location(0) vec4f {
|
|
return color;
|
|
}
|