struct VertexInput { float2 pos; float3 col; }; struct VertexOutput { float4 pos : SV_Position; float3 col; }; [shader("vertex")] VertexOutput vert_main(VertexInput vi) { VertexOutput vo; vo.pos = float4(vi.pos, 0., 1.); vo.col = vi.col; return vo; } [shader("fragment")] float4 frag_main(VertexOutput vo) : SV_Target { return float4(vo.col, 1.); }