rbdlsim/3rdparty/tracy/examples/ToyPathTracer/Windows/VertexShader.hlsl

14 lines
250 B
HLSL
Raw Permalink Normal View History

2021-08-06 12:10:32 +02:00
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;
}