rg/vaja_1/shader.wgsl
2024-11-17 19:09:01 +01:00

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;
}