13 lines
311 B
HLSL
13 lines
311 B
HLSL
struct VertexOutput
|
|
{
|
|
float4 position : SV_Position;
|
|
};
|
|
|
|
VertexOutput MainVS(uint vertexId : SV_VertexID)
|
|
{
|
|
VertexOutput output = (VertexOutput)0;
|
|
float2 quadPosition = float2(vertexId & 1, (vertexId >> 1) & 1) * 4.0 - 1.0;
|
|
output.position = float4(quadPosition, 1.0, 1.0);
|
|
return output;
|
|
}
|