You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tracy/examples/ToyPathTracer/Windows/VertexShader.hlsl

14 lines
250 B
HLSL

struct vs2ps
{
float2 uv : TEXCOORD0;
float4 pos : SV_Position;
};
vs2ps main(uint vid : SV_VertexID)
{
vs2ps o;
o.uv = float2((vid << 1) & 2, vid & 2);
o.pos = float4(o.uv * float2(2, 2) + float2(-1, -1), 0, 1);
return o;
}