From 6aaedb813fa11ba0679c3051bc2eb28646b9506c Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 30 Aug 2025 16:53:58 -0700 Subject: Update to SDL3 --- src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl (limited to 'src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl') diff --git a/src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl b/src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl new file mode 100644 index 0000000..6d214dc --- /dev/null +++ b/src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl @@ -0,0 +1,31 @@ +#define REG(reg, space) register(reg, space) + +cbuffer UBO : REG(b0, space1) +{ + float4x4 ModelViewProj; +}; + +struct VSInput +{ + float3 Position : TEXCOORD0; + float3 Color : TEXCOORD1; +}; + +struct VSOutput +{ + float4 Color : TEXCOORD0; + float4 Position : SV_Position; +}; + +VSOutput VSMain(VSInput input) +{ + VSOutput output; + output.Color = float4(input.Color, 1.0f); + output.Position = mul(ModelViewProj, float4(input.Position, 1.0f)); + return output; +} + +float4 PSMain(VSOutput input) : SV_Target0 +{ + return input.Color; +} -- cgit v1.2.3