Files
Seele/res/shaders/FullscreenQuad.slang
T

14 lines
315 B
Plaintext
Raw Normal View History

2025-03-10 18:35:35 +01:00
struct QuadOutput
{
float2 uv : UV;
float4 position : SV_Position;
}
[shader("vertex")]
QuadOutput quadMain(uint vertexIndex : SV_VertexID)
{
2025-04-13 14:41:42 +02:00
QuadOutput result;
result.uv = float2(vertexIndex & 2, (vertexIndex << 1) & 2);
2025-03-10 18:35:35 +01:00
result.position = float4(result.uv * 2.0f + -1.0f, 0.0f, 1.0f);
return result;
}