#include "mirage_util.slang"

struct ParamBuffer
{
    matrix transform;
};
ParameterBlock<ParamBuffer> param_buffer : register(b1);

struct PSInput {
    float4 position : SV_POSITION; // 裁剪空间坐标
    float4 color : COLOR; // 颜色
};

[shader("vertex")]
PSInput vertex_main(VSInput input)
{
    PSInput output;
    output.position = mul(float4(input.position, 0, 1.0), param_buffer.transform);
    output.color = input.color;
    return output;
}

[shader("pixel")]
float4 pixel_main(PSInput input) : SV_TARGET
{
    return input.color;
}
