aboutsummaryrefslogtreecommitdiff
path: root/samples/D3D11/src/shaders
diff options
context:
space:
mode:
authorlbavoil <[email protected]>2016-03-25 13:01:54 +0100
committerlbavoil <[email protected]>2016-03-25 13:01:54 +0100
commit99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c (patch)
treefbcd4260d6c953d569a887505336a1c3f202e10f /samples/D3D11/src/shaders
downloadhbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.tar.xz
hbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.zip
GFSDK_HBAO+_distro_r3.0_cl20573789
Diffstat (limited to 'samples/D3D11/src/shaders')
-rw-r--r--samples/D3D11/src/shaders/bin/CopyColorPS.h168
-rw-r--r--samples/D3D11/src/shaders/bin/FullScreenTriangleVS.h168
-rw-r--r--samples/D3D11/src/shaders/bin/GeometryPS.h315
-rw-r--r--samples/D3D11/src/shaders/bin/GeometryVS.h293
-rw-r--r--samples/D3D11/src/shaders/compile.bat15
-rw-r--r--samples/D3D11/src/shaders/src/Scene3D.hlsl122
6 files changed, 1081 insertions, 0 deletions
diff --git a/samples/D3D11/src/shaders/bin/CopyColorPS.h b/samples/D3D11/src/shaders/bin/CopyColorPS.h
new file mode 100644
index 0000000..03a551e
--- /dev/null
+++ b/samples/D3D11/src/shaders/bin/CopyColorPS.h
@@ -0,0 +1,168 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /O3 /T ps_5_0 src/Scene3D.hlsl /E CopyColorPS /Fh bin/CopyColorPS.h
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// PointSampler sampler NA NA 0 1
+// tColor texture float3 2d 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_Position 0 xyzw 0 POS float
+// TexCoord 0 xy 1 NONE float xy
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_5_0
+dcl_globalFlags refactoringAllowed
+dcl_sampler s0, mode_default
+dcl_resource_texture2d (float,float,float,float) t0
+dcl_input_ps linear v1.xy
+dcl_output o0.xyzw
+dcl_temps 1
+sample_indexable(texture2d)(float,float,float,float) r0.xyz, v1.xyxx, t0.xyzw, s0
+mov o0.xyz, r0.xyzx
+mov o0.w, l(1.000000)
+ret
+// Approximately 4 instruction slots used
+#endif
+
+const BYTE g_CopyColorPS[] =
+{
+ 68, 88, 66, 67, 135, 247,
+ 240, 213, 242, 107, 236, 51,
+ 243, 123, 169, 205, 39, 122,
+ 55, 177, 1, 0, 0, 0,
+ 208, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 0, 1, 0, 0, 88, 1,
+ 0, 0, 140, 1, 0, 0,
+ 52, 2, 0, 0, 82, 68,
+ 69, 70, 196, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 60, 0, 0, 0, 0, 5,
+ 255, 255, 0, 129, 0, 0,
+ 144, 0, 0, 0, 82, 68,
+ 49, 49, 60, 0, 0, 0,
+ 24, 0, 0, 0, 32, 0,
+ 0, 0, 40, 0, 0, 0,
+ 36, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 124, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0,
+ 0, 0, 137, 0, 0, 0,
+ 2, 0, 0, 0, 5, 0,
+ 0, 0, 4, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 9, 0, 0, 0, 80, 111,
+ 105, 110, 116, 83, 97, 109,
+ 112, 108, 101, 114, 0, 116,
+ 67, 111, 108, 111, 114, 0,
+ 77, 105, 99, 114, 111, 115,
+ 111, 102, 116, 32, 40, 82,
+ 41, 32, 72, 76, 83, 76,
+ 32, 83, 104, 97, 100, 101,
+ 114, 32, 67, 111, 109, 112,
+ 105, 108, 101, 114, 32, 57,
+ 46, 50, 57, 46, 57, 53,
+ 50, 46, 51, 49, 49, 49,
+ 0, 171, 171, 171, 73, 83,
+ 71, 78, 80, 0, 0, 0,
+ 2, 0, 0, 0, 8, 0,
+ 0, 0, 56, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 68, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 3, 3,
+ 0, 0, 83, 86, 95, 80,
+ 111, 115, 105, 116, 105, 111,
+ 110, 0, 84, 101, 120, 67,
+ 111, 111, 114, 100, 0, 171,
+ 171, 171, 79, 83, 71, 78,
+ 44, 0, 0, 0, 1, 0,
+ 0, 0, 8, 0, 0, 0,
+ 32, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
+ 83, 86, 95, 84, 65, 82,
+ 71, 69, 84, 0, 171, 171,
+ 83, 72, 69, 88, 160, 0,
+ 0, 0, 80, 0, 0, 0,
+ 40, 0, 0, 0, 106, 8,
+ 0, 1, 90, 0, 0, 3,
+ 0, 96, 16, 0, 0, 0,
+ 0, 0, 88, 24, 0, 4,
+ 0, 112, 16, 0, 0, 0,
+ 0, 0, 85, 85, 0, 0,
+ 98, 16, 0, 3, 50, 16,
+ 16, 0, 1, 0, 0, 0,
+ 101, 0, 0, 3, 242, 32,
+ 16, 0, 0, 0, 0, 0,
+ 104, 0, 0, 2, 1, 0,
+ 0, 0, 69, 0, 0, 139,
+ 194, 0, 0, 128, 67, 85,
+ 21, 0, 114, 0, 16, 0,
+ 0, 0, 0, 0, 70, 16,
+ 16, 0, 1, 0, 0, 0,
+ 70, 126, 16, 0, 0, 0,
+ 0, 0, 0, 96, 16, 0,
+ 0, 0, 0, 0, 54, 0,
+ 0, 5, 114, 32, 16, 0,
+ 0, 0, 0, 0, 70, 2,
+ 16, 0, 0, 0, 0, 0,
+ 54, 0, 0, 5, 130, 32,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 128, 63, 62, 0, 0, 1,
+ 83, 84, 65, 84, 148, 0,
+ 0, 0, 4, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
diff --git a/samples/D3D11/src/shaders/bin/FullScreenTriangleVS.h b/samples/D3D11/src/shaders/bin/FullScreenTriangleVS.h
new file mode 100644
index 0000000..64e3281
--- /dev/null
+++ b/samples/D3D11/src/shaders/bin/FullScreenTriangleVS.h
@@ -0,0 +1,168 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /O3 /T vs_5_0 src/Scene3D.hlsl /E FullScreenTriangleVS /Fh
+// bin/FullScreenTriangleVS.h
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_VertexID 0 x 0 VERTID uint x
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_Position 0 xyzw 0 POS float xyzw
+// TexCoord 0 xy 1 NONE float xy
+//
+vs_5_0
+dcl_globalFlags refactoringAllowed
+dcl_input_sgv v0.x, vertex_id
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xy
+dcl_temps 1
+bfi r0.x, l(1), l(1), v0.x, l(0)
+and r0.z, v0.x, l(2)
+utof r0.xy, r0.xzxx
+mad o0.xy, r0.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
+mov o1.xy, r0.xyxx
+mov o0.zw, l(0,0,0,1.000000)
+ret
+// Approximately 7 instruction slots used
+#endif
+
+const BYTE g_FullScreenTriangleVS[] =
+{
+ 68, 88, 66, 67, 52, 104,
+ 138, 187, 33, 254, 6, 251,
+ 172, 170, 188, 203, 33, 161,
+ 7, 239, 1, 0, 0, 0,
+ 236, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 172, 0, 0, 0, 224, 0,
+ 0, 0, 56, 1, 0, 0,
+ 80, 2, 0, 0, 82, 68,
+ 69, 70, 112, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 60, 0, 0, 0, 0, 5,
+ 254, 255, 0, 129, 0, 0,
+ 60, 0, 0, 0, 82, 68,
+ 49, 49, 60, 0, 0, 0,
+ 24, 0, 0, 0, 32, 0,
+ 0, 0, 40, 0, 0, 0,
+ 36, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 77, 105, 99, 114, 111, 115,
+ 111, 102, 116, 32, 40, 82,
+ 41, 32, 72, 76, 83, 76,
+ 32, 83, 104, 97, 100, 101,
+ 114, 32, 67, 111, 109, 112,
+ 105, 108, 101, 114, 32, 57,
+ 46, 50, 57, 46, 57, 53,
+ 50, 46, 51, 49, 49, 49,
+ 0, 171, 171, 171, 73, 83,
+ 71, 78, 44, 0, 0, 0,
+ 1, 0, 0, 0, 8, 0,
+ 0, 0, 32, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1,
+ 0, 0, 83, 86, 95, 86,
+ 101, 114, 116, 101, 120, 73,
+ 68, 0, 79, 83, 71, 78,
+ 80, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
+ 68, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 3, 12, 0, 0,
+ 83, 86, 95, 80, 111, 115,
+ 105, 116, 105, 111, 110, 0,
+ 84, 101, 120, 67, 111, 111,
+ 114, 100, 0, 171, 171, 171,
+ 83, 72, 69, 88, 16, 1,
+ 0, 0, 80, 0, 1, 0,
+ 68, 0, 0, 0, 106, 8,
+ 0, 1, 96, 0, 0, 4,
+ 18, 16, 16, 0, 0, 0,
+ 0, 0, 6, 0, 0, 0,
+ 103, 0, 0, 4, 242, 32,
+ 16, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 101, 0,
+ 0, 3, 50, 32, 16, 0,
+ 1, 0, 0, 0, 104, 0,
+ 0, 2, 1, 0, 0, 0,
+ 140, 0, 0, 11, 18, 0,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 1, 0,
+ 0, 0, 1, 64, 0, 0,
+ 1, 0, 0, 0, 10, 16,
+ 16, 0, 0, 0, 0, 0,
+ 1, 64, 0, 0, 0, 0,
+ 0, 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 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/samples/D3D11/src/shaders/bin/GeometryPS.h b/samples/D3D11/src/shaders/bin/GeometryPS.h
new file mode 100644
index 0000000..8cbc839
--- /dev/null
+++ b/samples/D3D11/src/shaders/bin/GeometryPS.h
@@ -0,0 +1,315 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /O3 /T ps_5_0 src/Scene3D.hlsl /E GeometryPS /Fh bin/GeometryPS.h
+//
+//
+// Buffer Definitions:
+//
+// cbuffer GlobalConstantBuffer
+// {
+//
+// row_major float4x4 g_WorldView; // Offset: 0 Size: 64 [unused]
+// row_major float4x4 g_WorldViewInverse;// Offset: 64 Size: 64
+// row_major float4x4 g_WorldViewProjection;// Offset: 128 Size: 64 [unused]
+// float g_IsWhite; // Offset: 192 Size: 4
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// GlobalConstantBuffer cbuffer NA NA 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float
+// TEXCOORD 0 xyz 1 NONE float xyz
+// TEXCOORD 1 xyz 2 NONE float
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_Target 0 xyzw 0 TARGET float xyzw
+// SV_Target 1 xyz 1 TARGET float xyz
+//
+ps_5_0
+dcl_globalFlags refactoringAllowed
+dcl_constantbuffer cb0[13], immediateIndexed
+dcl_input_ps linear centroid v1.xyz
+dcl_output o0.xyzw
+dcl_output o1.xyz
+dcl_temps 3
+ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[12].x
+movc o0.xyzw, r0.xxxx, l(1.000000,1.000000,1.000000,1.000000), l(0.457000,0.722000,0,1.000000)
+deriv_rtx_coarse r0.xyz, v1.zxyz
+deriv_rty_coarse r1.xyz, v1.yzxy
+mul r2.xyz, r0.xyzx, r1.xyzx
+mad r0.xyz, r0.zxyz, r1.yzxy, -r2.xyzx
+dp3 r0.w, r0.xyzx, r0.xyzx
+rsq r0.w, r0.w
+mul r0.xyz, r0.wwww, r0.xyzx
+mul r1.xyz, r0.yyyy, cb0[5].xyzx
+mad r0.xyw, r0.xxxx, cb0[4].xyxz, r1.xyxz
+mad r0.xyz, r0.zzzz, cb0[6].xyzx, r0.xywx
+mad o1.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
+ret
+// Approximately 14 instruction slots used
+#endif
+
+const BYTE g_GeometryPS[] =
+{
+ 68, 88, 66, 67, 166, 194,
+ 48, 172, 249, 92, 247, 65,
+ 27, 247, 154, 59, 213, 36,
+ 173, 34, 1, 0, 0, 0,
+ 176, 5, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 56, 2, 0, 0, 168, 2,
+ 0, 0, 244, 2, 0, 0,
+ 20, 5, 0, 0, 82, 68,
+ 69, 70, 252, 1, 0, 0,
+ 1, 0, 0, 0, 116, 0,
+ 0, 0, 1, 0, 0, 0,
+ 60, 0, 0, 0, 0, 5,
+ 255, 255, 0, 129, 0, 0,
+ 200, 1, 0, 0, 82, 68,
+ 49, 49, 60, 0, 0, 0,
+ 24, 0, 0, 0, 32, 0,
+ 0, 0, 40, 0, 0, 0,
+ 36, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 92, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0,
+ 0, 0, 71, 108, 111, 98,
+ 97, 108, 67, 111, 110, 115,
+ 116, 97, 110, 116, 66, 117,
+ 102, 102, 101, 114, 0, 171,
+ 171, 171, 92, 0, 0, 0,
+ 4, 0, 0, 0, 140, 0,
+ 0, 0, 208, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 44, 1, 0, 0,
+ 0, 0, 0, 0, 64, 0,
+ 0, 0, 0, 0, 0, 0,
+ 68, 1, 0, 0, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 104, 1, 0, 0, 64, 0,
+ 0, 0, 64, 0, 0, 0,
+ 2, 0, 0, 0, 68, 1,
+ 0, 0, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 123, 1,
+ 0, 0, 128, 0, 0, 0,
+ 64, 0, 0, 0, 0, 0,
+ 0, 0, 68, 1, 0, 0,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 145, 1, 0, 0,
+ 192, 0, 0, 0, 4, 0,
+ 0, 0, 2, 0, 0, 0,
+ 164, 1, 0, 0, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 103, 95, 87, 111, 114, 108,
+ 100, 86, 105, 101, 119, 0,
+ 102, 108, 111, 97, 116, 52,
+ 120, 52, 0, 171, 171, 171,
+ 2, 0, 3, 0, 4, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 56, 1, 0, 0,
+ 103, 95, 87, 111, 114, 108,
+ 100, 86, 105, 101, 119, 73,
+ 110, 118, 101, 114, 115, 101,
+ 0, 103, 95, 87, 111, 114,
+ 108, 100, 86, 105, 101, 119,
+ 80, 114, 111, 106, 101, 99,
+ 116, 105, 111, 110, 0, 103,
+ 95, 73, 115, 87, 104, 105,
+ 116, 101, 0, 102, 108, 111,
+ 97, 116, 0, 171, 171, 171,
+ 0, 0, 3, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 155, 1, 0, 0,
+ 77, 105, 99, 114, 111, 115,
+ 111, 102, 116, 32, 40, 82,
+ 41, 32, 72, 76, 83, 76,
+ 32, 83, 104, 97, 100, 101,
+ 114, 32, 67, 111, 109, 112,
+ 105, 108, 101, 114, 32, 57,
+ 46, 50, 57, 46, 57, 53,
+ 50, 46, 51, 49, 49, 49,
+ 0, 171, 171, 171, 73, 83,
+ 71, 78, 104, 0, 0, 0,
+ 3, 0, 0, 0, 8, 0,
+ 0, 0, 80, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 92, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 7, 7,
+ 0, 0, 92, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 2, 0, 0, 0, 7, 0,
+ 0, 0, 83, 86, 95, 80,
+ 79, 83, 73, 84, 73, 79,
+ 78, 0, 84, 69, 88, 67,
+ 79, 79, 82, 68, 0, 171,
+ 171, 171, 79, 83, 71, 78,
+ 68, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
+ 56, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 7, 8, 0, 0,
+ 83, 86, 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
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/samples/D3D11/src/shaders/bin/GeometryVS.h b/samples/D3D11/src/shaders/bin/GeometryVS.h
new file mode 100644
index 0000000..3d3af34
--- /dev/null
+++ b/samples/D3D11/src/shaders/bin/GeometryVS.h
@@ -0,0 +1,293 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /O3 /T vs_5_0 src/Scene3D.hlsl /E GeometryVS /Fh bin/GeometryVS.h
+//
+//
+// Buffer Definitions:
+//
+// cbuffer GlobalConstantBuffer
+// {
+//
+// row_major float4x4 g_WorldView; // Offset: 0 Size: 64
+// row_major float4x4 g_WorldViewInverse;// Offset: 64 Size: 64 [unused]
+// row_major float4x4 g_WorldViewProjection;// Offset: 128 Size: 64
+// float g_IsWhite; // Offset: 192 Size: 4 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// GlobalConstantBuffer cbuffer NA NA 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyz 0 NONE float xyz
+// NORMAL 0 xyz 1 NONE float xyz
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float xyzw
+// TEXCOORD 0 xyz 1 NONE float xyz
+// TEXCOORD 1 xyz 2 NONE float xyz
+//
+vs_5_0
+dcl_globalFlags refactoringAllowed
+dcl_constantbuffer cb0[12], immediateIndexed
+dcl_input v0.xyz
+dcl_input v1.xyz
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xyz
+dcl_output o2.xyz
+dcl_temps 1
+mul r0.xyzw, v0.yyyy, cb0[9].xyzw
+mad r0.xyzw, v0.xxxx, cb0[8].xyzw, r0.xyzw
+mad r0.xyzw, v0.zzzz, cb0[10].xyzw, r0.xyzw
+add o0.xyzw, r0.xyzw, cb0[11].xyzw
+mul r0.xyz, v0.yyyy, cb0[1].xyzx
+mad r0.xyz, v0.xxxx, cb0[0].xyzx, r0.xyzx
+mad r0.xyz, v0.zzzz, cb0[2].xyzx, r0.xyzx
+add o1.xyz, r0.xyzx, cb0[3].xyzx
+mov o2.xyz, v1.xyzx
+ret
+// Approximately 10 instruction slots used
+#endif
+
+const BYTE g_GeometryVS[] =
+{
+ 68, 88, 66, 67, 229, 202,
+ 254, 249, 218, 193, 230, 243,
+ 132, 191, 240, 223, 106, 250,
+ 79, 79, 1, 0, 0, 0,
+ 56, 5, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 56, 2, 0, 0, 136, 2,
+ 0, 0, 248, 2, 0, 0,
+ 156, 4, 0, 0, 82, 68,
+ 69, 70, 252, 1, 0, 0,
+ 1, 0, 0, 0, 116, 0,
+ 0, 0, 1, 0, 0, 0,
+ 60, 0, 0, 0, 0, 5,
+ 254, 255, 0, 129, 0, 0,
+ 200, 1, 0, 0, 82, 68,
+ 49, 49, 60, 0, 0, 0,
+ 24, 0, 0, 0, 32, 0,
+ 0, 0, 40, 0, 0, 0,
+ 36, 0, 0, 0, 12, 0,
+ 0, 0, 0, 0, 0, 0,
+ 92, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0,
+ 0, 0, 71, 108, 111, 98,
+ 97, 108, 67, 111, 110, 115,
+ 116, 97, 110, 116, 66, 117,
+ 102, 102, 101, 114, 0, 171,
+ 171, 171, 92, 0, 0, 0,
+ 4, 0, 0, 0, 140, 0,
+ 0, 0, 208, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 44, 1, 0, 0,
+ 0, 0, 0, 0, 64, 0,
+ 0, 0, 2, 0, 0, 0,
+ 68, 1, 0, 0, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 104, 1, 0, 0, 64, 0,
+ 0, 0, 64, 0, 0, 0,
+ 0, 0, 0, 0, 68, 1,
+ 0, 0, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 123, 1,
+ 0, 0, 128, 0, 0, 0,
+ 64, 0, 0, 0, 2, 0,
+ 0, 0, 68, 1, 0, 0,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 145, 1, 0, 0,
+ 192, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 164, 1, 0, 0, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 103, 95, 87, 111, 114, 108,
+ 100, 86, 105, 101, 119, 0,
+ 102, 108, 111, 97, 116, 52,
+ 120, 52, 0, 171, 171, 171,
+ 2, 0, 3, 0, 4, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 56, 1, 0, 0,
+ 103, 95, 87, 111, 114, 108,
+ 100, 86, 105, 101, 119, 73,
+ 110, 118, 101, 114, 115, 101,
+ 0, 103, 95, 87, 111, 114,
+ 108, 100, 86, 105, 101, 119,
+ 80, 114, 111, 106, 101, 99,
+ 116, 105, 111, 110, 0, 103,
+ 95, 73, 115, 87, 104, 105,
+ 116, 101, 0, 102, 108, 111,
+ 97, 116, 0, 171, 171, 171,
+ 0, 0, 3, 0, 1, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 155, 1, 0, 0,
+ 77, 105, 99, 114, 111, 115,
+ 111, 102, 116, 32, 40, 82,
+ 41, 32, 72, 76, 83, 76,
+ 32, 83, 104, 97, 100, 101,
+ 114, 32, 67, 111, 109, 112,
+ 105, 108, 101, 114, 32, 57,
+ 46, 50, 57, 46, 57, 53,
+ 50, 46, 51, 49, 49, 49,
+ 0, 171, 171, 171, 73, 83,
+ 71, 78, 72, 0, 0, 0,
+ 2, 0, 0, 0, 8, 0,
+ 0, 0, 56, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 7, 7,
+ 0, 0, 65, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 7, 7,
+ 0, 0, 80, 79, 83, 73,
+ 84, 73, 79, 78, 0, 78,
+ 79, 82, 77, 65, 76, 0,
+ 79, 83, 71, 78, 104, 0,
+ 0, 0, 3, 0, 0, 0,
+ 8, 0, 0, 0, 80, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 15, 0, 0, 0, 92, 0,
+ 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 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/samples/D3D11/src/shaders/compile.bat b/samples/D3D11/src/shaders/compile.bat
new file mode 100644
index 0000000..85e81d3
--- /dev/null
+++ b/samples/D3D11/src/shaders/compile.bat
@@ -0,0 +1,15 @@
+@echo off
+cd %~dp0
+del /F /Q bin\*
+
+set FXC=fxc.exe
+
+%FXC% /O3 /T ps_5_0 src/Scene3D.hlsl /E GeometryPS /Fh bin/GeometryPS.h
+
+%FXC% /O3 /T ps_5_0 src/Scene3D.hlsl /E CopyColorPS /Fh bin/CopyColorPS.h
+
+%FXC% /O3 /T vs_5_0 src/Scene3D.hlsl /E FullScreenTriangleVS /Fh bin/FullScreenTriangleVS.h
+
+%FXC% /O3 /T vs_5_0 src/Scene3D.hlsl /E GeometryVS /Fh bin/GeometryVS.h
+
+pause
diff --git a/samples/D3D11/src/shaders/src/Scene3D.hlsl b/samples/D3D11/src/shaders/src/Scene3D.hlsl
new file mode 100644
index 0000000..460f4e6
--- /dev/null
+++ b/samples/D3D11/src/shaders/src/Scene3D.hlsl
@@ -0,0 +1,122 @@
+// This code contains NVIDIA Confidential Information and is disclosed
+// under the Mutual Non-Disclosure Agreement.
+//
+// Notice
+// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
+// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
+// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
+// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
+//
+// NVIDIA Corporation assumes no responsibility for the consequences of use of such
+// information or for any infringement of patents or other rights of third parties that may
+// result from its use. No license is granted by implication or otherwise under any patent
+// or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
+// expressly authorized by NVIDIA. Details are subject to change without notice.
+// This code supersedes and replaces all information previously supplied.
+// NVIDIA Corporation products are not authorized for use as critical
+// components in life support devices or systems without express written approval of
+// NVIDIA Corporation.
+//
+// Copyright � 2008-2013 NVIDIA Corporation. All rights reserved.
+//
+// NVIDIA Corporation and its licensors retain all intellectual property and proprietary
+// rights in and to this software and related documentation and any modifications thereto.
+// Any use, reproduction, disclosure or distribution of this software and related
+// documentation without an express license agreement from NVIDIA Corporation is
+// strictly prohibited.
+//
+
+#pragma pack_matrix( row_major )
+
+#define USE_DDX_DDY 1
+#define USE_PER_SAMPLE_SHADING 0
+
+cbuffer GlobalConstantBuffer : register(b0)
+{
+ float4x4 g_WorldView;
+ float4x4 g_WorldViewInverse;
+ float4x4 g_WorldViewProjection;
+ float g_IsWhite;
+};
+
+Texture2D<float3> tColor : register(t0);
+SamplerState PointSampler : register(s0);
+
+//-----------------------------------------------------------------------------
+// Geometry-rendering shaders
+//-----------------------------------------------------------------------------
+
+struct VS_INPUT
+{
+ float3 WorldPosition : POSITION;
+ float3 WorldNormal : NORMAL;
+};
+
+struct VS_OUTPUT
+{
+ float4 HPosition : SV_POSITION;
+ centroid float3 ViewPosition : TEXCOORD0;
+ centroid float3 WorldNormal : TEXCOORD1;
+};
+
+struct PS_OUTPUT
+{
+ float4 Color : SV_Target0;
+ float3 WorldNormal : SV_Target1;
+};
+
+VS_OUTPUT GeometryVS( VS_INPUT input )
+{
+ VS_OUTPUT output;
+ output.HPosition = mul( float4(input.WorldPosition,1), g_WorldViewProjection );
+ output.ViewPosition = mul( float4(input.WorldPosition,1), g_WorldView ).xyz;
+ output.WorldNormal = input.WorldNormal.xyz;
+ return output;
+}
+
+PS_OUTPUT GeometryPS( VS_OUTPUT input
+#if USE_PER_SAMPLE_SHADING
+ , uint SampleIndex : SV_SampleIndex
+#endif
+ )
+{
+ PS_OUTPUT output;
+ output.Color = g_IsWhite ? float4(1,1,1,1) : float4(.457,.722, 0.0, 1);
+
+#if USE_DDX_DDY
+ float3 ViewNormal = normalize(cross(ddx(input.ViewPosition.xyz), ddy(input.ViewPosition.xyz)));
+ output.WorldNormal = mul(ViewNormal, (float3x3)g_WorldViewInverse);
+#else
+ output.WorldNormal = input.WorldNormal;
+#endif
+
+ // Lerp to [0,1]^3 to store in the non-signed R11G11B10_FLOAT format
+ output.WorldNormal = output.WorldNormal * 0.5 + 0.5;
+ return output;
+}
+
+//-----------------------------------------------------------------------------
+// Post-processing shaders
+//-----------------------------------------------------------------------------
+
+struct PostProc_VSOut
+{
+ float4 pos : SV_Position;
+ float2 uv : TexCoord;
+};
+
+// Vertex shader that generates a full screen quad with texcoords
+// To use draw 3 vertices with primitive type triangle list
+PostProc_VSOut FullScreenTriangleVS( uint id : SV_VertexID )
+{
+ PostProc_VSOut output = (PostProc_VSOut)0.0f;
+ output.uv = float2( (id << 1) & 2, id & 2 );
+ output.pos = float4( output.uv * float2( 2.0f, -2.0f ) + float2( -1.0f, 1.0f), 0.0f, 1.0f );
+ return output;
+}
+
+float4 CopyColorPS( PostProc_VSOut IN ) : SV_TARGET
+{
+ float3 color = tColor.Sample(PointSampler, IN.uv);
+ return float4(color,1);
+}