diff options
author | 3gg <3gg@shellblade.net> | 2025-08-30 16:53:58 -0700 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2025-08-30 16:53:58 -0700 |
commit | 6aaedb813fa11ba0679c3051bc2eb28646b9506c (patch) | |
tree | 34acbfc9840e02cb4753e6306ea7ce978bf8b58e /src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl | |
parent | 8f228ade99dd3d4c8da9b78ade1815c9adf85c8f (diff) |
Update to SDL3
Diffstat (limited to 'src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl')
-rw-r--r-- | src/contrib/SDL-3.2.20/test/testgpu/cube.hlsl | 31 |
1 files changed, 31 insertions, 0 deletions
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 @@ | |||
1 | #define REG(reg, space) register(reg, space) | ||
2 | |||
3 | cbuffer UBO : REG(b0, space1) | ||
4 | { | ||
5 | float4x4 ModelViewProj; | ||
6 | }; | ||
7 | |||
8 | struct VSInput | ||
9 | { | ||
10 | float3 Position : TEXCOORD0; | ||
11 | float3 Color : TEXCOORD1; | ||
12 | }; | ||
13 | |||
14 | struct VSOutput | ||
15 | { | ||
16 | float4 Color : TEXCOORD0; | ||
17 | float4 Position : SV_Position; | ||
18 | }; | ||
19 | |||
20 | VSOutput VSMain(VSInput input) | ||
21 | { | ||
22 | VSOutput output; | ||
23 | output.Color = float4(input.Color, 1.0f); | ||
24 | output.Position = mul(ModelViewProj, float4(input.Position, 1.0f)); | ||
25 | return output; | ||
26 | } | ||
27 | |||
28 | float4 PSMain(VSOutput input) : SV_Target0 | ||
29 | { | ||
30 | return input.Color; | ||
31 | } | ||