From f5c89b3bd5d74849757fd5b4d1a300068522a3ca Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Fri, 6 Mar 2026 13:26:57 -0800 Subject: Initial commit --- .../src/render/direct3d11/D3D11_VertexShader.hlsl | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl (limited to 'SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl') diff --git a/SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl b/SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl new file mode 100644 index 0000000..63e5172 --- /dev/null +++ b/SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl @@ -0,0 +1,38 @@ +#pragma pack_matrix( row_major ) + +cbuffer VertexShaderConstants : register(b0) +{ + matrix model; + matrix projectionAndView; +}; + +struct VertexShaderInput +{ + float3 pos : POSITION; + float2 tex : TEXCOORD0; + float4 color : COLOR0; +}; + +struct VertexShaderOutput +{ + float4 pos : SV_POSITION; + float2 tex : TEXCOORD0; + float4 color : COLOR0; +}; + +VertexShaderOutput main(VertexShaderInput input) +{ + VertexShaderOutput output; + float4 pos = float4(input.pos, 1.0f); + + // Transform the vertex position into projected space. + pos = mul(pos, model); + pos = mul(pos, projectionAndView); + output.pos = pos; + + // Pass through texture coordinates and color values without transformation + output.tex = input.tex; + output.color = input.color; + + return output; +} -- cgit v1.2.3