summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/src/render/direct3d12/D3D12_Shader_Common.hlsli
diff options
context:
space:
mode:
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.hlsli37
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
3cbuffer 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 )"