30 lines
583 B
Plaintext
30 lines
583 B
Plaintext
struct MatrixBuffer
|
|
{
|
|
matrix transform;
|
|
};
|
|
ParameterBlock<MatrixBuffer> matrix_buffer : register(b0);
|
|
SamplerState texture_sampler : register(s0);
|
|
|
|
struct VSInput {
|
|
float2 position : POSITION;
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
struct PSInput {
|
|
float4 position : SV_POSITION;
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
PSInput vertex_main(VSInput input)
|
|
{
|
|
PSInput output;
|
|
output.position = mul(float4(input.position, 0.0, 1.0), matrix_buffer.transform);
|
|
output.color = input.color;
|
|
return output;
|
|
}
|
|
|
|
float4 pixel_main(PSInput input) : SV_TARGET
|
|
{
|
|
return input.color;
|
|
}
|