2023-11-02 06:20:12 +01:00
|
|
|
struct Input {
|
|
|
|
float4x4 transform;
|
|
|
|
float2 translation;
|
|
|
|
};
|
|
|
|
|
|
|
|
[[vk::push_constant]]
|
|
|
|
ConstantBuffer<Input> gInput : register(b0, space0);
|
|
|
|
|
2023-10-31 03:41:05 +01:00
|
|
|
void VSMain(
|
2023-11-02 06:20:12 +01:00
|
|
|
in float2 iPosition : POSITION,
|
|
|
|
in float4 iColor : COLOR,
|
|
|
|
in float2 iUV : TEXCOORD,
|
|
|
|
out float4 oColor : COLOR,
|
|
|
|
out float2 oUV : TEXCOORD,
|
|
|
|
out float4 oPosition : SV_Position
|
2023-10-31 03:41:05 +01:00
|
|
|
)
|
|
|
|
{
|
2023-11-02 06:20:12 +01:00
|
|
|
float2 translatedPos = iPosition + gInput.translation;
|
|
|
|
oPosition = mul(gInput.transform, float4(translatedPos, 0, 1));
|
|
|
|
|
|
|
|
oColor = iColor;
|
|
|
|
oUV = iUV;
|
2023-10-31 03:41:05 +01:00
|
|
|
}
|