From 5a079a2d114f96d4847d1ee305d5b7c16eeec50e Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 27 Dec 2025 12:03:39 -0800 Subject: Initial commit --- .../src/render/direct3d11/D3D11_VertexShader.hlsl | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 contrib/SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl (limited to 'contrib/SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl') diff --git a/contrib/SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl b/contrib/SDL-3.2.8/src/render/direct3d11/D3D11_VertexShader.hlsl new file mode 100644 index 0000000..63e5172 --- /dev/null +++ b/contrib/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