oden/third-party/vendor/gpu-allocator/examples/d3d12-visualization/shaders/imgui.vs.hlsl
2024-03-08 11:03:01 -08:00

30 lines
No EOL
586 B
HLSL

struct VertexInput
{
float2 pos : POSITION;
float2 texCoord : TEXCOORD0;
float4 color: COLOR;
};
struct VertexOutput
{
float4 position : SV_POSITION;
float2 texCoord: TEXCOORD0;
float4 color: COLOR;
};
struct Constants
{
float2 scale;
float2 translation;
};
ConstantBuffer<Constants> g_constants : register(b0, space0);
VertexOutput main(VertexInput vertex)
{
VertexOutput o;
o.position = float4(vertex.pos * g_constants.scale + g_constants.translation, 0.0, 1.0);
o.texCoord = vertex.texCoord;
o.color = vertex.color;
return o;
}