diff options
Diffstat (limited to 'contrib/SDL-3.2.8/test/testgpu/cube.hlsl')
| -rw-r--r-- | contrib/SDL-3.2.8/test/testgpu/cube.hlsl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/test/testgpu/cube.hlsl b/contrib/SDL-3.2.8/test/testgpu/cube.hlsl new file mode 100644 index 0000000..6d214dc --- /dev/null +++ b/contrib/SDL-3.2.8/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 | } | ||
