34 lines
473 B
Plaintext
34 lines
473 B
Plaintext
|
|
#[set(everything)]
|
|
const constants: {
|
|
empty: float4;
|
|
};
|
|
|
|
struct vert_in {
|
|
pos: float2;
|
|
tex: float2;
|
|
col: float4;
|
|
}
|
|
|
|
struct vert_out {
|
|
pos: float4;
|
|
col: float4;
|
|
}
|
|
|
|
fun draw_rect_vert(input: vert_in): vert_out {
|
|
var output: vert_out;
|
|
output.pos = float4(input.pos, 0.0, 1.0);
|
|
output.col = input.col;
|
|
return output;
|
|
}
|
|
|
|
fun draw_rect_frag(input: vert_out): float4 {
|
|
return input.col;
|
|
}
|
|
|
|
#[pipe]
|
|
struct pipe {
|
|
vertex = draw_rect_vert;
|
|
fragment = draw_rect_frag;
|
|
}
|