Add buildable C engine, shaders and music source
This commit is contained in:
parent
1d805b8896
commit
18721711c4
44 changed files with 23427 additions and 3 deletions
18
fx/fullscreen.hlsl
Normal file
18
fx/fullscreen.hlsl
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue