Commit ce8057221af13f5778af60c0b1a336cf0438de40

David Ludwig 2013-12-25T21:39:48

WinRT: compiled the d3d11 renderer's shaders into SDL itself Previously, the shaders would get compiled separately, the output of which would need to be packaged into the app. This change should make SDL's dll be the only binary needed to include SDL in a WinRT app.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
diff --git a/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj b/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj
index 0f185be..4eaeca3 100644
--- a/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj
+++ b/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj
@@ -397,26 +397,6 @@
       <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
     </ClCompile>
   </ItemGroup>
-  <ItemGroup>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureColored.hlsl">
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
-    </FxCompile>
-  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj.filters b/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj.filters
index 59296bf..9535fe7 100644
--- a/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj.filters
+++ b/VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj.filters
@@ -7,9 +7,6 @@
     <Filter Include="Source Files">
       <UniqueIdentifier>{abc3a7e6-f955-4cb5-8340-fae0f653e9c1}</UniqueIdentifier>
     </Filter>
-    <Filter Include="GPU Shaders">
-      <UniqueIdentifier>{fd67993e-5155-488b-9313-d1eb06a1b67e}</UniqueIdentifier>
-    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\include\begin_code.h">
@@ -612,15 +609,4 @@
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
-  <ItemGroup>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureColored.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
-  </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj
index f06787f..a63bbc8 100644
--- a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj
+++ b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj
@@ -324,48 +324,6 @@
     <ClInclude Include="..\..\src\video\winrt\SDL_winrtopengles.h" />
     <ClInclude Include="..\..\src\video\winrt\SDL_winrtvideo_cpp.h" />
   </ItemGroup>
-  <ItemGroup>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">4.0_level_9_1</ShaderModel>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureColored.hlsl">
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0_level_9_1</ShaderModel>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
-      <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">4.0_level_9_1</ShaderModel>
-      <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">4.0_level_9_1</ShaderModel>
-    </FxCompile>
-  </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{aeaea3a2-d4e6-45b1-8ec6-53d84287fc14}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
diff --git a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters
index bff9c9d..21ec9bb 100644
--- a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters
+++ b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters
@@ -1,17 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_VertexShader_Default.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
-    <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_TextureColored.hlsl">
-      <Filter>GPU Shaders</Filter>
-    </FxCompile>
-  </ItemGroup>
-  <ItemGroup>
     <ClCompile Include="..\..\src\SDL.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -652,8 +641,5 @@
     <Filter Include="Source Files">
       <UniqueIdentifier>{ddf04d85-6a87-4c5a-bc52-869b38f45a61}</UniqueIdentifier>
     </Filter>
-    <Filter Include="GPU Shaders">
-      <UniqueIdentifier>{83ed1283-8234-4c77-99a8-ffcfd8ce7381}</UniqueIdentifier>
-    </Filter>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/src/render/direct3d11/SDL_D3D11_PixelShader_FixedColor.hlsl b/src/render/direct3d11/SDL_D3D11_PixelShader_FixedColor.hlsl
deleted file mode 100644
index 84de709..0000000
--- a/src/render/direct3d11/SDL_D3D11_PixelShader_FixedColor.hlsl
+++ /dev/null
@@ -1,12 +0,0 @@
-
-struct PixelShaderInput
-{
-    float4 pos : SV_POSITION;
-    float2 tex : TEXCOORD0;
-    float4 color : COLOR0;
-};
-
-float4 main(PixelShaderInput input) : SV_TARGET
-{
-    return input.color;
-}
diff --git a/src/render/direct3d11/SDL_D3D11_PixelShader_TextureColored.hlsl b/src/render/direct3d11/SDL_D3D11_PixelShader_TextureColored.hlsl
deleted file mode 100644
index 503b4fd..0000000
--- a/src/render/direct3d11/SDL_D3D11_PixelShader_TextureColored.hlsl
+++ /dev/null
@@ -1,14 +0,0 @@
-Texture2D theTexture : register(t0);
-SamplerState theSampler : register(s0);
-
-struct PixelShaderInput
-{
-    float4 pos : SV_POSITION;
-    float2 tex : TEXCOORD0;
-    float4 color : COLOR0;
-};
-
-float4 main(PixelShaderInput input) : SV_TARGET
-{
-    return theTexture.Sample(theSampler, input.tex) * input.color;
-}
diff --git a/src/render/direct3d11/SDL_D3D11_VertexShader_Default.hlsl b/src/render/direct3d11/SDL_D3D11_VertexShader_Default.hlsl
deleted file mode 100644
index c625c09..0000000
--- a/src/render/direct3d11/SDL_D3D11_VertexShader_Default.hlsl
+++ /dev/null
@@ -1,41 +0,0 @@
-
-#pragma pack_matrix( row_major )
-
-cbuffer VertexShaderConstants : register(b0)
-{
-    matrix model;
-    matrix view;
-    matrix projection;
-};
-
-struct VertexShaderInput
-{
-    float3 pos : POSITION;
-    float2 tex : TEXCOORD0;
-    float4 color : COLOR0;
-};
-
-struct VertexShaderOutput
-{
-    float4 pos : SV_POSITION;
-    float2 tex : TEXCOORD0;
-    float4 color : COLOR0;
-};
-
-VertexShaderOutput main(VertexShaderInput input)
-{
-    VertexShaderOutput output;
-    float4 pos = float4(input.pos, 1.0f);
-
-    // Transform the vertex position into projected space.
-    pos = mul(pos, model);
-    pos = mul(pos, view);
-    pos = mul(pos, projection);
-    output.pos = pos;
-
-    // Pass through texture coordinates and color values without transformation
-    output.tex = input.tex;
-    output.color = input.color;
-
-    return output;
-}
diff --git a/src/render/direct3d11/SDL_render_d3d11.cpp b/src/render/direct3d11/SDL_render_d3d11.cpp
index 56d3ba3..f285a64 100644
--- a/src/render/direct3d11/SDL_render_d3d11.cpp
+++ b/src/render/direct3d11/SDL_render_d3d11.cpp
@@ -130,6 +130,395 @@ typedef struct
 } D3D11_RenderData;
 
 
+/* Direct3D 11.x shaders
+
+   SDL's shaders are compiled into SDL itself, to simplify distribution.
+
+   All Direct3D 11.x shaders were compiled with the following:
+
+   fxc /E"main" /T "<TYPE>" /Fo"<OUTPUT FILE>" "<INPUT FILE>"
+
+     Variables:
+     - <TYPE>: the type of shader.  A table of utilized shader types is
+       listed below.
+     - <OUTPUT FILE>: where to store compiled output
+     - <INPUT FILE>: where to read shader source code from
+
+     Shader types:
+     - ps_4_0_level_9_1: Pixel shader for Windows 8+, including Windows RT
+     - vs_4_0_level_9_1: Vertex shader for Windows 8+, including Windows RT
+     - ps_4_0_level_9_3: Pixel shader for Windows Phone 8
+     - vs_4_0_level_9_3: Vertex shader for Windows Phone 8
+  */
+#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
+#define D3D11_USE_SHADER_MODEL_4_0_level_9_3
+#else
+#define D3D11_USE_SHADER_MODEL_4_0_level_9_1
+#endif
+
+/* The texture-rendering pixel shader:
+
+    --- D3D11_PixelShader_Textures.hlsl ---
+    Texture2D theTexture : register(t0);
+    SamplerState theSampler : register(s0);
+
+    struct PixelShaderInput
+    {
+        float4 pos : SV_POSITION;
+        float2 tex : TEXCOORD0;
+        float4 color : COLOR0;
+    };
+
+    float4 main(PixelShaderInput input) : SV_TARGET
+    {
+        return theTexture.Sample(theSampler, input.tex) * input.color;
+    }
+*/
+#if defined(D3D11_USE_SHADER_MODEL_4_0_level_9_1)
+static const DWORD D3D11_PixelShader_Textures[] = {
+    0x43425844, 0x6299b59f, 0x155258f2, 0x873ab86a, 0xfcbb6dcd, 0x00000001,
+    0x00000330, 0x00000006, 0x00000038, 0x000000c0, 0x0000015c, 0x000001d8,
+    0x00000288, 0x000002fc, 0x396e6f41, 0x00000080, 0x00000080, 0xffff0200,
+    0x00000058, 0x00000028, 0x00280000, 0x00280000, 0x00280000, 0x00240001,
+    0x00280000, 0x00000000, 0xffff0200, 0x0200001f, 0x80000000, 0xb0030000,
+    0x0200001f, 0x80000000, 0xb00f0001, 0x0200001f, 0x90000000, 0xa00f0800,
+    0x03000042, 0x800f0000, 0xb0e40000, 0xa0e40800, 0x03000005, 0x800f0000,
+    0x80e40000, 0xb0e40001, 0x02000001, 0x800f0800, 0x80e40000, 0x0000ffff,
+    0x52444853, 0x00000094, 0x00000040, 0x00000025, 0x0300005a, 0x00106000,
+    0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062,
+    0x00101032, 0x00000001, 0x03001062, 0x001010f2, 0x00000002, 0x03000065,
+    0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x09000045, 0x001000f2,
+    0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000,
+    0x00000000, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000,
+    0x00101e46, 0x00000002, 0x0100003e, 0x54415453, 0x00000074, 0x00000003,
+    0x00000001, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000000,
+    0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x46454452, 0x000000a8,
+    0x00000000, 0x00000000, 0x00000002, 0x0000001c, 0xffff0400, 0x00000100,
+    0x00000072, 0x0000005c, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000001, 0x00000001, 0x00000067, 0x00000002, 0x00000005,
+    0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x53656874,
+    0x6c706d61, 0x74007265, 0x65546568, 0x72757478, 0x694d0065, 0x736f7263,
+    0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43,
+    0x72656c69, 0x332e3920, 0x32392e30, 0x312e3030, 0x34383336, 0xababab00,
+    0x4e475349, 0x0000006c, 0x00000003, 0x00000008, 0x00000050, 0x00000000,
+    0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x0000005c, 0x00000000,
+    0x00000000, 0x00000003, 0x00000001, 0x00000303, 0x00000065, 0x00000000,
+    0x00000000, 0x00000003, 0x00000002, 0x00000f0f, 0x505f5653, 0x5449534f,
+    0x004e4f49, 0x43584554, 0x44524f4f, 0x4c4f4300, 0xab00524f, 0x4e47534f,
+    0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
+    0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054
+};
+#elif defined(D3D11_USE_SHADER_MODEL_4_0_level_9_3)
+static const DWORD D3D11_PixelShader_Textures[] = {
+    0x43425844, 0x5876569a, 0x01b6c87e, 0x8447454f, 0xc7f3ef10, 0x00000001,
+    0x00000330, 0x00000006, 0x00000038, 0x000000c0, 0x0000015c, 0x000001d8,
+    0x00000288, 0x000002fc, 0x396e6f41, 0x00000080, 0x00000080, 0xffff0200,
+    0x00000058, 0x00000028, 0x00280000, 0x00280000, 0x00280000, 0x00240001,
+    0x00280000, 0x00000000, 0xffff0201, 0x0200001f, 0x80000000, 0xb0030000,
+    0x0200001f, 0x80000000, 0xb00f0001, 0x0200001f, 0x90000000, 0xa00f0800,
+    0x03000042, 0x800f0000, 0xb0e40000, 0xa0e40800, 0x03000005, 0x800f0000,
+    0x80e40000, 0xb0e40001, 0x02000001, 0x800f0800, 0x80e40000, 0x0000ffff,
+    0x52444853, 0x00000094, 0x00000040, 0x00000025, 0x0300005a, 0x00106000,
+    0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062,
+    0x00101032, 0x00000001, 0x03001062, 0x001010f2, 0x00000002, 0x03000065,
+    0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x09000045, 0x001000f2,
+    0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000,
+    0x00000000, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000,
+    0x00101e46, 0x00000002, 0x0100003e, 0x54415453, 0x00000074, 0x00000003,
+    0x00000001, 0x00000000, 0x00000003, 0x00000001, 0x00000000, 0x00000000,
+    0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x46454452, 0x000000a8,
+    0x00000000, 0x00000000, 0x00000002, 0x0000001c, 0xffff0400, 0x00000100,
+    0x00000072, 0x0000005c, 0x00000003, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000001, 0x00000001, 0x00000067, 0x00000002, 0x00000005,
+    0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x53656874,
+    0x6c706d61, 0x74007265, 0x65546568, 0x72757478, 0x694d0065, 0x736f7263,
+    0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43,
+    0x72656c69, 0x332e3920, 0x32392e30, 0x312e3030, 0x34383336, 0xababab00,
+    0x4e475349, 0x0000006c, 0x00000003, 0x00000008, 0x00000050, 0x00000000,
+    0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x0000005c, 0x00000000,
+    0x00000000, 0x00000003, 0x00000001, 0x00000303, 0x00000065, 0x00000000,
+    0x00000000, 0x00000003, 0x00000002, 0x00000f0f, 0x505f5653, 0x5449534f,
+    0x004e4f49, 0x43584554, 0x44524f4f, 0x4c4f4300, 0xab00524f, 0x4e47534f,
+    0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
+    0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054
+};
+#else
+#error "An appropriate 'textures' pixel shader is not defined"
+#endif
+
+/* The color-only-rendering pixel shader:
+
+   --- D3D11_PixelShader_Colors.hlsl ---
+   struct PixelShaderInput
+   {
+       float4 pos : SV_POSITION;
+       float2 tex : TEXCOORD0;
+       float4 color : COLOR0;
+   };
+
+   float4 main(PixelShaderInput input) : SV_TARGET
+   {
+       return input.color;
+   }
+*/
+#if defined(D3D11_USE_SHADER_MODEL_4_0_level_9_1)
+static const DWORD D3D11_PixelShader_Colors[] = {
+    0x43425844, 0xd74c28fe, 0xa1eb8804, 0x269d512a, 0x7699723d, 0x00000001,
+    0x00000240, 0x00000006, 0x00000038, 0x00000084, 0x000000c4, 0x00000140,
+    0x00000198, 0x0000020c, 0x396e6f41, 0x00000044, 0x00000044, 0xffff0200,
+    0x00000020, 0x00000024, 0x00240000, 0x00240000, 0x00240000, 0x00240000,
+    0x00240000, 0xffff0200, 0x0200001f, 0x80000000, 0xb00f0001, 0x02000001,
+    0x800f0800, 0xb0e40001, 0x0000ffff, 0x52444853, 0x00000038, 0x00000040,
+    0x0000000e, 0x03001062, 0x001010f2, 0x00000002, 0x03000065, 0x001020f2,
+    0x00000000, 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000002,
+    0x0100003e, 0x54415453, 0x00000074, 0x00000002, 0x00000000, 0x00000000,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x46454452, 0x00000050, 0x00000000, 0x00000000,
+    0x00000000, 0x0000001c, 0xffff0400, 0x00000100, 0x0000001c, 0x7263694d,
+    0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072,
+    0x6c69706d, 0x39207265, 0x2e30332e, 0x30303239, 0x3336312e, 0xab003438,
+    0x4e475349, 0x0000006c, 0x00000003, 0x00000008, 0x00000050, 0x00000000,
+    0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x0000005c, 0x00000000,
+    0x00000000, 0x00000003, 0x00000001, 0x00000003, 0x00000065, 0x00000000,
+    0x00000000, 0x00000003, 0x00000002, 0x00000f0f, 0x505f5653, 0x5449534f,
+    0x004e4f49, 0x43584554, 0x44524f4f, 0x4c4f4300, 0xab00524f, 0x4e47534f,
+    0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
+    0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054
+};
+#elif defined(D3D11_USE_SHADER_MODEL_4_0_level_9_3)
+static const DWORD D3D11_PixelShader_Colors[] = {
+    0x43425844, 0x93f6ccfc, 0x5f919270, 0x7a11aa4f, 0x9148e931, 0x00000001,
+    0x00000240, 0x00000006, 0x00000038, 0x00000084, 0x000000c4, 0x00000140,
+    0x00000198, 0x0000020c, 0x396e6f41, 0x00000044, 0x00000044, 0xffff0200,
+    0x00000020, 0x00000024, 0x00240000, 0x00240000, 0x00240000, 0x00240000,
+    0x00240000, 0xffff0201, 0x0200001f, 0x80000000, 0xb00f0001, 0x02000001,
+    0x800f0800, 0xb0e40001, 0x0000ffff, 0x52444853, 0x00000038, 0x00000040,
+    0x0000000e, 0x03001062, 0x001010f2, 0x00000002, 0x03000065, 0x001020f2,
+    0x00000000, 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000002,
+    0x0100003e, 0x54415453, 0x00000074, 0x00000002, 0x00000000, 0x00000000,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x46454452, 0x00000050, 0x00000000, 0x00000000,
+    0x00000000, 0x0000001c, 0xffff0400, 0x00000100, 0x0000001c, 0x7263694d,
+    0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072,
+    0x6c69706d, 0x39207265, 0x2e30332e, 0x30303239, 0x3336312e, 0xab003438,
+    0x4e475349, 0x0000006c, 0x00000003, 0x00000008, 0x00000050, 0x00000000,
+    0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x0000005c, 0x00000000,
+    0x00000000, 0x00000003, 0x00000001, 0x00000003, 0x00000065, 0x00000000,
+    0x00000000, 0x00000003, 0x00000002, 0x00000f0f, 0x505f5653, 0x5449534f,
+    0x004e4f49, 0x43584554, 0x44524f4f, 0x4c4f4300, 0xab00524f, 0x4e47534f,
+    0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
+    0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054,
+};
+#else
+#error "An appropriate 'colors' pixel shader is not defined."
+#endif
+
+/* The sole vertex shader:
+
+   --- D3D11_VertexShader.hlsl ---
+   #pragma pack_matrix( row_major )
+
+   cbuffer VertexShaderConstants : register(b0)
+   {
+       matrix model;
+       matrix view;
+       matrix projection;
+   };
+
+   struct VertexShaderInput
+   {
+       float3 pos : POSITION;
+       float2 tex : TEXCOORD0;
+       float4 color : COLOR0;
+   };
+
+   struct VertexShaderOutput
+   {
+       float4 pos : SV_POSITION;
+       float2 tex : TEXCOORD0;
+       float4 color : COLOR0;
+   };
+
+   VertexShaderOutput main(VertexShaderInput input)
+   {
+       VertexShaderOutput output;
+       float4 pos = float4(input.pos, 1.0f);
+
+       // Transform the vertex position into projected space.
+       pos = mul(pos, model);
+       pos = mul(pos, view);
+       pos = mul(pos, projection);
+       output.pos = pos;
+
+       // Pass through texture coordinates and color values without transformation
+       output.tex = input.tex;
+       output.color = input.color;
+
+       return output;
+   }
+*/
+#if defined(D3D11_USE_SHADER_MODEL_4_0_level_9_1)
+static const DWORD D3D11_VertexShader[] = {
+    0x43425844, 0x3f31b022, 0x2ffad8b8, 0xd6c45cbd, 0xa7894c28, 0x00000001,
+    0x00000690, 0x00000006, 0x00000038, 0x000001b8, 0x00000418, 0x00000494,
+    0x000005ac, 0x0000061c, 0x396e6f41, 0x00000178, 0x00000178, 0xfffe0200,
+    0x00000144, 0x00000034, 0x00240001, 0x00300000, 0x00300000, 0x00240000,
+    0x00300001, 0x00000000, 0x0001000c, 0x00000000, 0x00000000, 0xfffe0200,
+    0x0200001f, 0x80000005, 0x900f0000, 0x0200001f, 0x80010005, 0x900f0001,
+    0x0200001f, 0x80020005, 0x900f0002, 0x03000005, 0x800f0000, 0x90550000,
+    0xa0e40002, 0x04000004, 0x800f0000, 0x90000000, 0xa0e40001, 0x80e40000,
+    0x04000004, 0x800f0000, 0x90aa0000, 0xa0e40003, 0x80e40000, 0x03000002,
+    0x800f0000, 0x80e40000, 0xa0e40004, 0x03000005, 0x800f0001, 0x80550000,
+    0xa0e40006, 0x04000004, 0x800f0001, 0x80000000, 0xa0e40005, 0x80e40001,
+    0x04000004, 0x800f0001, 0x80aa0000, 0xa0e40007, 0x80e40001, 0x04000004,
+    0x800f0000, 0x80ff0000, 0xa0e40008, 0x80e40001, 0x03000005, 0x800f0001,
+    0x80550000, 0xa0e4000a, 0x04000004, 0x800f0001, 0x80000000, 0xa0e40009,
+    0x80e40001, 0x04000004, 0x800f0001, 0x80aa0000, 0xa0e4000b, 0x80e40001,
+    0x04000004, 0x800f0000, 0x80ff0000, 0xa0e4000c, 0x80e40001, 0x04000004,
+    0xc0030000, 0x80ff0000, 0xa0e40000, 0x80e40000, 0x02000001, 0xc00c0000,
+    0x80e40000, 0x02000001, 0xe0030000, 0x90e40001, 0x02000001, 0xe00f0001,
+    0x90e40002, 0x0000ffff, 0x52444853, 0x00000258, 0x00010040, 0x00000096,
+    0x04000059, 0x00208e46, 0x00000000, 0x0000000c, 0x0300005f, 0x00101072,
+    0x00000000, 0x0300005f, 0x00101032, 0x00000001, 0x0300005f, 0x001010f2,
+    0x00000002, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065,
+    0x00102032, 0x00000001, 0x03000065, 0x001020f2, 0x00000002, 0x02000068,
+    0x00000002, 0x08000038, 0x001000f2, 0x00000000, 0x00101556, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000001, 0x0a000032, 0x001000f2, 0x00000000,
+    0x00101006, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x00100e46,
+    0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00101aa6, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000002, 0x00100e46, 0x00000000, 0x08000000,
+    0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208e46, 0x00000000,
+    0x00000003, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000005, 0x0a000032, 0x001000f2, 0x00000001,
+    0x00100006, 0x00000000, 0x00208e46, 0x00000000, 0x00000004, 0x00100e46,
+    0x00000001, 0x0a000032, 0x001000f2, 0x00000001, 0x00100aa6, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000006, 0x00100e46, 0x00000001, 0x0a000032,
+    0x001000f2, 0x00000000, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000,
+    0x00000007, 0x00100e46, 0x00000001, 0x08000038, 0x001000f2, 0x00000001,
+    0x00100556, 0x00000000, 0x00208e46, 0x00000000, 0x00000009, 0x0a000032,
+    0x001000f2, 0x00000001, 0x00100006, 0x00000000, 0x00208e46, 0x00000000,
+    0x00000008, 0x00100e46, 0x00000001, 0x0a000032, 0x001000f2, 0x00000001,
+    0x00100aa6, 0x00000000, 0x00208e46, 0x00000000, 0x0000000a, 0x00100e46,
+    0x00000001, 0x0a000032, 0x001020f2, 0x00000000, 0x00100ff6, 0x00000000,
+    0x00208e46, 0x00000000, 0x0000000b, 0x00100e46, 0x00000001, 0x05000036,
+    0x00102032, 0x00000001, 0x00101046, 0x00000001, 0x05000036, 0x001020f2,
+    0x00000002, 0x00101e46, 0x00000002, 0x0100003e, 0x54415453, 0x00000074,
+    0x0000000f, 0x00000002, 0x00000000, 0x00000006, 0x00000004, 0x00000000,
+    0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x46454452,
+    0x00000110, 0x00000001, 0x00000054, 0x00000001, 0x0000001c, 0xfffe0400,
+    0x00000100, 0x000000dc, 0x0000003c, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x74726556, 0x68537865,
+    0x72656461, 0x736e6f43, 0x746e6174, 0xabab0073, 0x0000003c, 0x00000003,
+    0x0000006c, 0x000000c0, 0x00000000, 0x00000000, 0x000000b4, 0x00000000,
+    0x00000040, 0x00000002, 0x000000bc, 0x00000000, 0x000000cc, 0x00000040,
+    0x00000040, 0x00000002, 0x000000bc, 0x00000000, 0x000000d1, 0x00000080,
+    0x00000040, 0x00000002, 0x000000bc, 0x00000000, 0x65646f6d, 0xabab006c,
+    0x00030002, 0x00040004, 0x00000000, 0x00000000, 0x77656976, 0x6f727000,
+    0x7463656a, 0x006e6f69, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029,
+    0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e30332e,
+    0x30303239, 0x3336312e, 0xab003438, 0x4e475349, 0x00000068, 0x00000003,
+    0x00000008, 0x00000050, 0x00000000, 0x00000000, 0x00000003, 0x00000000,
+    0x00000707, 0x00000059, 0x00000000, 0x00000000, 0x00000003, 0x00000001,
+    0x00000303, 0x00000062, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
+    0x00000f0f, 0x49534f50, 0x4e4f4954, 0x58455400, 0x524f4f43, 0x4f430044,
+    0x00524f4c, 0x4e47534f, 0x0000006c, 0x00000003, 0x00000008, 0x00000050,
+    0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x0000005c,
+    0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000c03, 0x00000065,
+    0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x0000000f, 0x505f5653,
+    0x5449534f, 0x004e4f49, 0x43584554, 0x44524f4f, 0x4c4f4300, 0xab00524f,
+};
+#elif defined(D3D11_USE_SHADER_MODEL_4_0_level_9_3)
+static const DWORD D3D11_VertexShader[] = {
+    0x43425844, 0xacfd840a, 0x6a6ae1e1, 0xc3649c43, 0x8bfc0816, 0x00000001,
+    0x00000690, 0x00000006, 0x00000038, 0x000001b8, 0x00000418, 0x00000494,
+    0x000005ac, 0x0000061c, 0x396e6f41, 0x00000178, 0x00000178, 0xfffe0200,
+    0x00000144, 0x00000034, 0x00240001, 0x00300000, 0x00300000, 0x00240000,
+    0x00300001, 0x00000000, 0x0001000c, 0x00000000, 0x00000000, 0xfffe0201,
+    0x0200001f, 0x80000005, 0x900f0000, 0x0200001f, 0x80010005, 0x900f0001,
+    0x0200001f, 0x80020005, 0x900f0002, 0x03000005, 0x800f0000, 0x90550000,
+    0xa0e40002, 0x04000004, 0x800f0000, 0x90000000, 0xa0e40001, 0x80e40000,
+    0x04000004, 0x800f0000, 0x90aa0000, 0xa0e40003, 0x80e40000, 0x03000002,
+    0x800f0000, 0x80e40000, 0xa0e40004, 0x03000005, 0x800f0001, 0x80550000,
+    0xa0e40006, 0x04000004, 0x800f0001, 0x80000000, 0xa0e40005, 0x80e40001,
+    0x04000004, 0x800f0001, 0x80aa0000, 0xa0e40007, 0x80e40001, 0x04000004,
+    0x800f0000, 0x80ff0000, 0xa0e40008, 0x80e40001, 0x03000005, 0x800f0001,
+    0x80550000, 0xa0e4000a, 0x04000004, 0x800f0001, 0x80000000, 0xa0e40009,
+    0x80e40001, 0x04000004, 0x800f0001, 0x80aa0000, 0xa0e4000b, 0x80e40001,
+    0x04000004, 0x800f0000, 0x80ff0000, 0xa0e4000c, 0x80e40001, 0x04000004,
+    0xc0030000, 0x80ff0000, 0xa0e40000, 0x80e40000, 0x02000001, 0xc00c0000,
+    0x80e40000, 0x02000001, 0xe0030000, 0x90e40001, 0x02000001, 0xe00f0001,
+    0x90e40002, 0x0000ffff, 0x52444853, 0x00000258, 0x00010040, 0x00000096,
+    0x04000059, 0x00208e46, 0x00000000, 0x0000000c, 0x0300005f, 0x00101072,
+    0x00000000, 0x0300005f, 0x00101032, 0x00000001, 0x0300005f, 0x001010f2,
+    0x00000002, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065,
+    0x00102032, 0x00000001, 0x03000065, 0x001020f2, 0x00000002, 0x02000068,
+    0x00000002, 0x08000038, 0x001000f2, 0x00000000, 0x00101556, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000001, 0x0a000032, 0x001000f2, 0x00000000,
+    0x00101006, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x00100e46,
+    0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00101aa6, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000002, 0x00100e46, 0x00000000, 0x08000000,
+    0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208e46, 0x00000000,
+    0x00000003, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000005, 0x0a000032, 0x001000f2, 0x00000001,
+    0x00100006, 0x00000000, 0x00208e46, 0x00000000, 0x00000004, 0x00100e46,
+    0x00000001, 0x0a000032, 0x001000f2, 0x00000001, 0x00100aa6, 0x00000000,
+    0x00208e46, 0x00000000, 0x00000006, 0x00100e46, 0x00000001, 0x0a000032,
+    0x001000f2, 0x00000000, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000,
+    0x00000007, 0x00100e46, 0x00000001, 0x08000038, 0x001000f2, 0x00000001,
+    0x00100556, 0x00000000, 0x00208e46, 0x00000000, 0x00000009, 0x0a000032,
+    0x001000f2, 0x00000001, 0x00100006, 0x00000000, 0x00208e46, 0x00000000,
+    0x00000008, 0x00100e46, 0x00000001, 0x0a000032, 0x001000f2, 0x00000001,
+    0x00100aa6, 0x00000000, 0x00208e46, 0x00000000, 0x0000000a, 0x00100e46,
+    0x00000001, 0x0a000032, 0x001020f2, 0x00000000, 0x00100ff6, 0x00000000,
+    0x00208e46, 0x00000000, 0x0000000b, 0x00100e46, 0x00000001, 0x05000036,
+    0x00102032, 0x00000001, 0x00101046, 0x00000001, 0x05000036, 0x001020f2,
+    0x00000002, 0x00101e46, 0x00000002, 0x0100003e, 0x54415453, 0x00000074,
+    0x0000000f, 0x00000002, 0x00000000, 0x00000006, 0x00000004, 0x00000000,
+    0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x46454452,
+    0x00000110, 0x00000001, 0x00000054, 0x00000001, 0x0000001c, 0xfffe0400,
+    0x00000100, 0x000000dc, 0x0000003c, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x74726556, 0x68537865,
+    0x72656461, 0x736e6f43, 0x746e6174, 0xabab0073, 0x0000003c, 0x00000003,
+    0x0000006c, 0x000000c0, 0x00000000, 0x00000000, 0x000000b4, 0x00000000,
+    0x00000040, 0x00000002, 0x000000bc, 0x00000000, 0x000000cc, 0x00000040,
+    0x00000040, 0x00000002, 0x000000bc, 0x00000000, 0x000000d1, 0x00000080,
+    0x00000040, 0x00000002, 0x000000bc, 0x00000000, 0x65646f6d, 0xabab006c,
+    0x00030002, 0x00040004, 0x00000000, 0x00000000, 0x77656976, 0x6f727000,
+    0x7463656a, 0x006e6f69, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029,
+    0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e30332e,
+    0x30303239, 0x3336312e, 0xab003438, 0x4e475349, 0x00000068, 0x00000003,
+    0x00000008, 0x00000050, 0x00000000, 0x00000000, 0x00000003, 0x00000000,
+    0x00000707, 0x00000059, 0x00000000, 0x00000000, 0x00000003, 0x00000001,
+    0x00000303, 0x00000062, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
+    0x00000f0f, 0x49534f50, 0x4e4f4954, 0x58455400, 0x524f4f43, 0x4f430044,
+    0x00524f4c, 0x4e47534f, 0x0000006c, 0x00000003, 0x00000008, 0x00000050,
+    0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x0000005c,
+    0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000c03, 0x00000065,
+    0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x0000000f, 0x505f5653,
+    0x5449534f, 0x004e4f49, 0x43584554, 0x44524f4f, 0x4c4f4300, 0xab00524f
+};
+#else
+#error "An appropriate vertex shader is not defined."
+#endif
+
 /* Direct3D 11.1 renderer implementation */
 static SDL_Renderer *D3D11_CreateRenderer(SDL_Window * window, Uint32 flags);
 static void D3D11_WindowEvent(SDL_Renderer * renderer,
@@ -294,66 +683,6 @@ D3D11_DestroyRenderer(SDL_Renderer * renderer)
     }
 }
 
-static bool
-D3D11_ReadFileContents(const wstring & fileName, vector<char> & out)
-{
-    ifstream in(fileName, ios::in | ios::binary);
-    if (!in) {
-        return false;
-    }
-
-    in.seekg(0, ios::end);
-    out.resize((size_t) in.tellg());
-    in.seekg(0, ios::beg);
-    in.read(&out[0], out.size());
-    return in.good();
-}
-
-static bool
-D3D11_ReadShaderContents(const wstring & shaderName, vector<char> & out)
-{
-    wstring fileName;
-
-#if WINAPI_FAMILY == WINAPI_FAMILY_APP
-    fileName = SDL_WinRTGetFSPathUNICODE(SDL_WINRT_PATH_INSTALLED_LOCATION);
-    fileName += L"\\SDL_VS2012_WinRT\\";
-#elif WINAPI_FAMILY == WINAPI_PHONE_APP
-    fileName = SDL_WinRTGetFSPathUNICODE(SDL_WINRT_PATH_INSTALLED_LOCATION);
-    fileName += L"\\";
-#endif
-    // TODO, WinRT: test Direct3D 11.1 shader loading on Win32
-    fileName += shaderName;
-    return D3D11_ReadFileContents(fileName, out);
-}
-
-static HRESULT
-D3D11_LoadPixelShader(SDL_Renderer * renderer,
-                      const wstring & shaderName,
-                      ID3D11PixelShader ** shaderOutput)
-{
-    D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
-    HRESULT result = S_OK;
-    vector<char> fileData;
-    
-    if (!D3D11_ReadShaderContents(shaderName, fileData)) {
-        SDL_SetError("Unable to open SDL's pixel shader file.");
-        return E_FAIL;
-    }
-
-    result = data->d3dDevice->CreatePixelShader(
-        &fileData[0],
-        fileData.size(),
-        nullptr,
-        shaderOutput
-        );
-    if (FAILED(result)) {
-        WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader", result);
-        return result;
-    }
-
-    return S_OK;
-}
-
 static HRESULT
 D3D11_CreateBlendMode(SDL_Renderer * renderer,
                       BOOL enableBlending,
@@ -396,12 +725,12 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer)
     UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
 
     // Make sure Direct3D's debugging feature gets used, if the app requests it.
-    const char *hint = SDL_GetHint(SDL_HINT_RENDER_DIRECT3D11_DEBUG);
-    if (hint) {
-        if (*hint == '1') {
+    //const char *hint = SDL_GetHint(SDL_HINT_RENDER_DIRECT3D11_DEBUG);
+    //if (hint) {
+    //    if (*hint == '1') {
             creationFlags |= D3D11_CREATE_DEVICE_DEBUG;
-        }
-    }
+    //    }
+    //}
 
     // This array defines the set of DirectX hardware feature levels this app will support.
     // Note the ordering should be preserved.
@@ -481,15 +810,9 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer)
     //
     // Load in SDL's one and only vertex shader:
     //
-    vector<char> fileData;
-    if (!D3D11_ReadShaderContents(L"SDL_D3D11_VertexShader_Default.cso", fileData)) {
-        SDL_SetError("Unable to open SDL's vertex shader file.");
-        return E_FAIL;
-    }
-
     result = data->d3dDevice->CreateVertexShader(
-        &fileData[0],
-        fileData.size(),
+        D3D11_VertexShader,
+        sizeof(D3D11_VertexShader),
         nullptr,
         &data->vertexShader
         );
@@ -511,8 +834,8 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer)
     result = data->d3dDevice->CreateInputLayout(
         vertexDesc,
         ARRAYSIZE(vertexDesc),
-        &fileData[0],
-        fileData.size(),
+        D3D11_VertexShader,
+        sizeof(D3D11_VertexShader),
         &data->inputLayout
         );
     if (FAILED(result)) {
@@ -523,15 +846,26 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer)
     //
     // Load in SDL's pixel shaders
     //
-    result = D3D11_LoadPixelShader(renderer, L"SDL_D3D11_PixelShader_TextureColored.cso", &data->texturePixelShader);
+
+    result = data->d3dDevice->CreatePixelShader(
+        D3D11_PixelShader_Textures,
+        sizeof(D3D11_PixelShader_Textures),
+        nullptr,
+        &data->texturePixelShader
+        );
     if (FAILED(result)) {
-        // D3D11_LoadPixelShader will have aleady set the SDL error
+        WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['textures' shader]", result);
         return result;
     }
 
-    result = D3D11_LoadPixelShader(renderer, L"SDL_D3D11_PixelShader_FixedColor.cso", &data->colorPixelShader);
+    result = data->d3dDevice->CreatePixelShader(
+        D3D11_PixelShader_Colors,
+        sizeof(D3D11_PixelShader_Colors),
+        nullptr,
+        &data->colorPixelShader
+        );
     if (FAILED(result)) {
-        // D3D11_LoadPixelShader will have aleady set the SDL error
+        WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['color' shader]", result);
         return result;
     }