Add buildable C engine, shaders and music source

This commit is contained in:
CRTkafa 2026-09-05 11:16:54 +07:00
parent 1d805b8896
commit 18721711c4
44 changed files with 23427 additions and 3 deletions

18
fx/fullscreen.hlsl Normal file
View file

@ -0,0 +1,18 @@
// One triangle that covers the screen, built from the vertex id alone.
// Nothing is bound: no vertex buffer, no input layout, no index buffer.
// Draw(3, 0) with topology TRIANGLELIST is the whole call.
struct VSOut
{
float4 pos : SV_Position;
float2 uv : TEXCOORD0;
};
VSOut main(uint id : SV_VertexID)
{
VSOut o;
o.uv = float2((id << 1) & 2, id & 2); // (0,0) (2,0) (0,2)
o.pos = float4(o.uv.x * 2.0 - 1.0,
1.0 - o.uv.y * 2.0, 0.0, 1.0);
return o;
}