Files
SDL/test/testgpu/overlay.vert.hlsl
Sam Lantinga a864dcac25 Added support for using the GPU renderer as an offscreen renderer
SDL_CreateGPURenderer() now allows passing in an existing GPU device and passing in a NULL window to create an offscreen renderer.

Also renamed SDL_SetRenderGPUState() to SDL_SetGPURenderState().
2025-10-01 23:32:18 -07:00

26 lines
474 B
HLSL

#include "overlay.hlsli"
static const uint verts[6] = {0, 1, 2, 0, 2, 3};
static const float2 uvs[4] = {
{0.0f, 0.0f},
{1.0f, 0.0f},
{1.0f, 1.0f},
{0.0f, 1.0f}
};
static const float2 pos[4] = {
{-1.0f, 1.0f},
{1.0f, 1.0f},
{1.0f, -1.0f},
{-1.0f, -1.0f}
};
VSOutput main(uint id : SV_VertexID)
{
VSOutput output;
uint vert = verts[id];
output.uv = uvs[vert];
output.pos = float4(pos[vert], 0.0f, 1.0f);
return output;
}