diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
| commit | 5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch) | |
| tree | 8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/render/direct3d12/D3D12_Shader_Common.hlsli | |
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/render/direct3d12/D3D12_Shader_Common.hlsli')
| -rw-r--r-- | contrib/SDL-3.2.8/src/render/direct3d12/D3D12_Shader_Common.hlsli | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/render/direct3d12/D3D12_Shader_Common.hlsli b/contrib/SDL-3.2.8/src/render/direct3d12/D3D12_Shader_Common.hlsli new file mode 100644 index 0000000..4bf8074 --- /dev/null +++ b/contrib/SDL-3.2.8/src/render/direct3d12/D3D12_Shader_Common.hlsli | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | #pragma pack_matrix( row_major ) | ||
| 2 | |||
| 3 | cbuffer VertexShaderConstants : register(b0) | ||
| 4 | { | ||
| 5 | matrix model; | ||
| 6 | matrix projectionAndView; | ||
| 7 | }; | ||
| 8 | |||
| 9 | #define ColorRS \ | ||
| 10 | "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
| 11 | "DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
| 12 | "DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
| 13 | "DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
| 14 | "RootConstants(num32BitConstants=32, b0)," \ | ||
| 15 | "RootConstants(num32BitConstants=24, b1)"\ | ||
| 16 | |||
| 17 | #define TextureRS \ | ||
| 18 | "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
| 19 | " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
| 20 | " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
| 21 | " DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
| 22 | "RootConstants(num32BitConstants=32, b0),"\ | ||
| 23 | "RootConstants(num32BitConstants=24, b1),"\ | ||
| 24 | "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
| 25 | "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" | ||
| 26 | |||
| 27 | #define AdvancedRS \ | ||
| 28 | "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
| 29 | " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
| 30 | " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
| 31 | " DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
| 32 | "RootConstants(num32BitConstants=32, b0),"\ | ||
| 33 | "RootConstants(num32BitConstants=24, b1),"\ | ||
| 34 | "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
| 35 | "DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
| 36 | "DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
| 37 | "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" | ||
