update SDL3 from 3.2.20 to 3.4.2

This commit is contained in:
Sven Balzer
2026-04-01 18:25:03 +02:00
parent 1daf4d79f1
commit 05b19704f8
1626 changed files with 124218 additions and 191491 deletions
File diff suppressed because it is too large Load Diff
@@ -3,7 +3,7 @@
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions:
// Buffer Definitions:
//
// cbuffer Constants
// {
@@ -12,14 +12,15 @@
// float texture_type; // Offset: 4 Size: 4 [unused]
// float input_type; // Offset: 8 Size: 4 [unused]
// float color_scale; // Offset: 12 Size: 4
// float tonemap_method; // Offset: 16 Size: 4 [unused]
// float tonemap_factor1; // Offset: 20 Size: 4 [unused]
// float tonemap_factor2; // Offset: 24 Size: 4 [unused]
// float sdr_white_point; // Offset: 28 Size: 4 [unused]
// float4 Yoffset; // Offset: 32 Size: 16 [unused]
// float4 Rcoeff; // Offset: 48 Size: 16 [unused]
// float4 Gcoeff; // Offset: 64 Size: 16 [unused]
// float4 Bcoeff; // Offset: 80 Size: 16 [unused]
// float4 texel_size; // Offset: 16 Size: 16 [unused]
// float tonemap_method; // Offset: 32 Size: 4 [unused]
// float tonemap_factor1; // Offset: 36 Size: 4 [unused]
// float tonemap_factor2; // Offset: 40 Size: 4 [unused]
// float sdr_white_point; // Offset: 44 Size: 4 [unused]
// float4 Yoffset; // Offset: 48 Size: 16 [unused]
// float4 Rcoeff; // Offset: 64 Size: 16 [unused]
// float4 Gcoeff; // Offset: 80 Size: 16 [unused]
// float4 Bcoeff; // Offset: 96 Size: 16 [unused]
//
// }
//
@@ -28,7 +29,7 @@
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// Constants cbuffer NA NA cb0 1
// Constants cbuffer NA NA cb0 1
//
//
//
@@ -36,8 +37,8 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float
// COLOR 0 xyzw 2 NONE float xyzw
//
//
@@ -72,213 +73,218 @@ dcl_temps 1
mov r0.x, cb0[0].w
mov r0.w, l(1.000000)
mul o0.xyzw, r0.xxxw, v2.xyzw
ret
ret
// Approximately 4 instruction slots used
#endif
const BYTE g_main[] =
{
68, 88, 66, 67, 78, 223,
23, 23, 93, 184, 255, 26,
153, 0, 220, 179, 25, 194,
30, 249, 1, 0, 0, 0,
192, 4, 0, 0, 6, 0,
0, 0, 56, 0, 0, 0,
172, 0, 0, 0, 56, 1,
0, 0, 180, 1, 0, 0,
24, 4, 0, 0, 140, 4,
0, 0, 65, 111, 110, 57,
108, 0, 0, 0, 108, 0,
0, 0, 0, 2, 255, 255,
60, 0, 0, 0, 48, 0,
0, 0, 1, 0, 36, 0,
0, 0, 48, 0, 0, 0,
48, 0, 0, 0, 36, 0,
0, 0, 48, 0, 0, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 2,
255, 255, 31, 0, 0, 2,
0, 0, 0, 128, 1, 0,
15, 176, 5, 0, 0, 3,
0, 0, 7, 128, 1, 0,
228, 176, 0, 0, 255, 160,
1, 0, 0, 2, 0, 0,
8, 128, 1, 0, 255, 176,
1, 0, 0, 2, 0, 8,
15, 128, 0, 0, 228, 128,
255, 255, 0, 0, 83, 72,
68, 82, 132, 0, 0, 0,
64, 0, 0, 0, 33, 0,
0, 0, 89, 0, 0, 4,
70, 142, 32, 0, 0, 0,
0, 0, 1, 0, 0, 0,
98, 16, 0, 3, 242, 16,
16, 0, 2, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 0, 0, 0, 0,
104, 0, 0, 2, 1, 0,
0, 0, 54, 0, 0, 6,
18, 0, 16, 0, 0, 0,
0, 0, 58, 128, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 54, 0, 0, 5,
130, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 56, 0,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0,
2, 0, 0, 0, 144, 1,
0, 0, 0, 0, 0, 0,
196, 1, 0, 0, 16, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 144, 1,
0, 0, 0, 0, 0, 0,
211, 1, 0, 0, 20, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 144, 1,
0, 0, 0, 0, 0, 0,
227, 1, 0, 0, 24, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 144, 1,
0, 0, 0, 0, 0, 0,
243, 1, 0, 0, 28, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 144, 1,
0, 0, 0, 0, 0, 0,
3, 2, 0, 0, 32, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 12, 2,
0, 0, 0, 0, 0, 0,
28, 2, 0, 0, 48, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 12, 2,
0, 0, 0, 0, 0, 0,
35, 2, 0, 0, 64, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 12, 2,
0, 0, 0, 0, 0, 0,
42, 2, 0, 0, 80, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 12, 2,
0, 0, 0, 0, 0, 0,
115, 99, 82, 71, 66, 95,
111, 117, 116, 112, 117, 116,
0, 171, 171, 171, 0, 0,
3, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 116, 101, 120, 116,
117, 114, 101, 95, 116, 121,
112, 101, 0, 105, 110, 112,
117, 116, 95, 116, 121, 112,
101, 0, 99, 111, 108, 111,
114, 95, 115, 99, 97, 108,
101, 0, 116, 111, 110, 101,
109, 97, 112, 95, 109, 101,
116, 104, 111, 100, 0, 116,
111, 110, 101, 109, 97, 112,
95, 102, 97, 99, 116, 111,
114, 49, 0, 116, 111, 110,
101, 109, 97, 112, 95, 102,
97, 99, 116, 111, 114, 50,
0, 115, 100, 114, 95, 119,
104, 105, 116, 101, 95, 112,
111, 105, 110, 116, 0, 89,
111, 102, 102, 115, 101, 116,
0, 171, 1, 0, 3, 0,
1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
82, 99, 111, 101, 102, 102,
0, 71, 99, 111, 101, 102,
102, 0, 66, 99, 111, 101,
102, 102, 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, 49, 48, 46, 49,
0, 171, 171, 171, 73, 83,
71, 78, 108, 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, 3, 0,
0, 0, 101, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
2, 0, 0, 0, 15, 15,
0, 0, 83, 86, 95, 80,
79, 83, 73, 84, 73, 79,
78, 0, 84, 69, 88, 67,
79, 79, 82, 68, 0, 67,
79, 76, 79, 82, 0, 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
68, 88, 66, 67, 131, 2,
46, 215, 253, 13, 129, 98,
132, 106, 250, 166, 217, 206,
9, 154, 1, 0, 0, 0,
224, 4, 0, 0, 6, 0,
0, 0, 56, 0, 0, 0,
172, 0, 0, 0, 56, 1,
0, 0, 180, 1, 0, 0,
56, 4, 0, 0, 172, 4,
0, 0, 65, 111, 110, 57,
108, 0, 0, 0, 108, 0,
0, 0, 0, 2, 255, 255,
60, 0, 0, 0, 48, 0,
0, 0, 1, 0, 36, 0,
0, 0, 48, 0, 0, 0,
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 1,
0, 0, 0, 0, 0, 0,
63, 2, 0, 0, 64, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 232, 1,
0, 0, 0, 0, 0, 0,
70, 2, 0, 0, 80, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 232, 1,
0, 0, 0, 0, 0, 0,
77, 2, 0, 0, 96, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 232, 1,
0, 0, 0, 0, 0, 0,
115, 99, 82, 71, 66, 95,
111, 117, 116, 112, 117, 116,
0, 171, 171, 171, 0, 0,
3, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 116, 101, 120, 116,
117, 114, 101, 95, 116, 121,
112, 101, 0, 105, 110, 112,
117, 116, 95, 116, 121, 112,
101, 0, 99, 111, 108, 111,
114, 95, 115, 99, 97, 108,
101, 0, 116, 101, 120, 101,
108, 95, 115, 105, 122, 101,
0, 171, 1, 0, 3, 0,
1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
116, 111, 110, 101, 109, 97,
112, 95, 109, 101, 116, 104,
111, 100, 0, 116, 111, 110,
101, 109, 97, 112, 95, 102,
97, 99, 116, 111, 114, 49,
0, 116, 111, 110, 101, 109,
97, 112, 95, 102, 97, 99,
116, 111, 114, 50, 0, 115,
100, 114, 95, 119, 104, 105,
116, 101, 95, 112, 111, 105,
110, 116, 0, 89, 111, 102,
102, 115, 101, 116, 0, 82,
99, 111, 101, 102, 102, 0,
71, 99, 111, 101, 102, 102,
0, 66, 99, 111, 101, 102,
102, 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, 49, 48, 46, 49, 0,
73, 83, 71, 78, 108, 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,
3, 0, 0, 0, 101, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 2, 0, 0, 0,
15, 15, 0, 0, 83, 86,
95, 80, 79, 83, 73, 84,
73, 79, 78, 0, 84, 69,
88, 67, 79, 79, 82, 68,
0, 67, 79, 76, 79, 82,
0, 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
};
@@ -3,6 +3,7 @@ Texture2D texture0 : register(t0);
Texture2D texture1 : register(t1);
Texture2D texture2 : register(t2);
SamplerState sampler0 : register(s0);
SamplerState sampler1 : register(s1);
struct PixelShaderInput
{
@@ -18,9 +19,13 @@ static const float TONEMAP_CHROME = 2;
static const float TEXTURETYPE_NONE = 0;
static const float TEXTURETYPE_RGB = 1;
static const float TEXTURETYPE_NV12 = 2;
static const float TEXTURETYPE_NV21 = 3;
static const float TEXTURETYPE_YUV = 4;
static const float TEXTURETYPE_RGB_PIXELART = 2;
static const float TEXTURETYPE_PALETTE_NEAREST = 3;
static const float TEXTURETYPE_PALETTE_LINEAR = 4;
static const float TEXTURETYPE_PALETTE_PIXELART = 5;
static const float TEXTURETYPE_NV12 = 6;
static const float TEXTURETYPE_NV21 = 7;
static const float TEXTURETYPE_YUV = 8;
static const float INPUTTYPE_UNSPECIFIED = 0;
static const float INPUTTYPE_SRGB = 1;
@@ -33,6 +38,7 @@ cbuffer Constants : register(b0)
float texture_type;
float input_type;
float color_scale;
float4 texel_size;
float tonemap_method;
float tonemap_factor1;
@@ -114,6 +120,50 @@ float3 ApplyTonemap(float3 v)
return v;
}
float4 SamplePaletteNearest(float2 uv)
{
float index = texture0.Sample(sampler0, uv).r * 255;
return texture1.Sample(sampler1, float2((index + 0.5) / 256, 0.5));
}
// Implementation with thanks from bgolus:
// https://discussions.unity.com/t/how-to-make-data-shader-support-bilinear-trilinear/598639/8
float4 SamplePaletteLinear(float2 uv)
{
// scale & offset uvs to integer values at texel centers
float2 uv_texels = uv * texel_size.zw + 0.5;
// get uvs for the center of the 4 surrounding texels by flooring
float4 uv_min_max = float4((floor(uv_texels) - 0.5) * texel_size.xy, (floor(uv_texels) + 0.5) * texel_size.xy);
// blend factor
float2 uv_frac = frac(uv_texels);
// sample all 4 texels
float4 texelA = SamplePaletteNearest(uv_min_max.xy);
float4 texelB = SamplePaletteNearest(uv_min_max.xw);
float4 texelC = SamplePaletteNearest(uv_min_max.zy);
float4 texelD = SamplePaletteNearest(uv_min_max.zw);
// bilinear interpolation
return lerp(lerp(texelA, texelB, uv_frac.y), lerp(texelC, texelD, uv_frac.y), uv_frac.x);
}
float2 GetPixelArtUV(float2 uv)
{
// box filter size in texel units
float2 boxSize = clamp(fwidth(uv) * texel_size.zw, 1e-5, 1);
// scale uv by texture size to get texel coordinate
float2 tx = uv * texel_size.zw - 0.5 * boxSize;
// compute offset for pixel-sized box filter
float2 txOffset = smoothstep(1 - boxSize, 1, frac(tx));
// compute bilinear sample uv coordinates
return (floor(tx) + 0.5 + txOffset) * texel_size.xy;
}
float4 GetInputColor(PixelShaderInput input)
{
float4 rgba;
@@ -122,6 +172,16 @@ float4 GetInputColor(PixelShaderInput input)
rgba = 1.0;
} else if (texture_type == TEXTURETYPE_RGB) {
rgba = texture0.Sample(sampler0, input.tex);
} else if (texture_type == TEXTURETYPE_RGB_PIXELART) {
float2 uv = GetPixelArtUV(input.tex);
rgba = texture0.SampleGrad(sampler0, uv, ddx(input.tex), ddy(input.tex));
} else if (texture_type == TEXTURETYPE_PALETTE_NEAREST) {
rgba = SamplePaletteNearest(input.tex);
} else if (texture_type == TEXTURETYPE_PALETTE_LINEAR) {
rgba = SamplePaletteLinear(input.tex);
} else if (texture_type == TEXTURETYPE_PALETTE_PIXELART) {
float2 uv = GetPixelArtUV(input.tex);
rgba = SamplePaletteLinear(uv);
} else if (texture_type == TEXTURETYPE_NV12) {
float3 yuv;
yuv.x = texture0.Sample(sampler0, input.tex).r;
@@ -157,7 +217,7 @@ float4 GetInputColor(PixelShaderInput input)
// Error!
rgba.r = 1.0;
rgba.g = 0.0;
rgba.b = 0.0;
rgba.b = 1.0;
rgba.a = 1.0;
}
return rgba;
@@ -3,7 +3,7 @@
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions:
// Buffer Definitions:
//
// cbuffer Constants
// {
@@ -12,14 +12,15 @@
// float texture_type; // Offset: 4 Size: 4 [unused]
// float input_type; // Offset: 8 Size: 4 [unused]
// float color_scale; // Offset: 12 Size: 4
// float tonemap_method; // Offset: 16 Size: 4 [unused]
// float tonemap_factor1; // Offset: 20 Size: 4 [unused]
// float tonemap_factor2; // Offset: 24 Size: 4 [unused]
// float sdr_white_point; // Offset: 28 Size: 4 [unused]
// float4 Yoffset; // Offset: 32 Size: 16 [unused]
// float4 Rcoeff; // Offset: 48 Size: 16 [unused]
// float4 Gcoeff; // Offset: 64 Size: 16 [unused]
// float4 Bcoeff; // Offset: 80 Size: 16 [unused]
// float4 texel_size; // Offset: 16 Size: 16 [unused]
// float tonemap_method; // Offset: 32 Size: 4 [unused]
// float tonemap_factor1; // Offset: 36 Size: 4 [unused]
// float tonemap_factor2; // Offset: 40 Size: 4 [unused]
// float sdr_white_point; // Offset: 44 Size: 4 [unused]
// float4 Yoffset; // Offset: 48 Size: 16 [unused]
// float4 Rcoeff; // Offset: 64 Size: 16 [unused]
// float4 Gcoeff; // Offset: 80 Size: 16 [unused]
// float4 Bcoeff; // Offset: 96 Size: 16 [unused]
//
// }
//
@@ -28,9 +29,9 @@
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// theSampler sampler NA NA s0 1
// theTexture texture float4 2d t0 1
// Constants cbuffer NA NA cb0 1
// sampler0 sampler NA NA s0 1
// texture0 texture float4 2d t0 1
// Constants cbuffer NA NA cb0 1
//
//
//
@@ -38,8 +39,8 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
// COLOR 0 xyzw 2 NONE float xyzw
//
//
@@ -61,7 +62,7 @@
//
// Target Sampler Source Sampler Source Resource
// -------------- --------------- ----------------
// s0 s0 t0
// s0 s0 t0
//
//
// Level9 shader bytecode:
@@ -87,246 +88,250 @@ dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xyz, r0.xyzx, cb0[0].wwww
mul o0.xyzw, r0.xyzw, v2.xyzw
ret
ret
// Approximately 4 instruction slots used
#endif
const BYTE g_main[] =
{
68, 88, 66, 67, 8, 152,
224, 210, 182, 254, 37, 89,
68, 213, 13, 174, 95, 42,
2, 11, 1, 0, 0, 0,
132, 5, 0, 0, 6, 0,
0, 0, 56, 0, 0, 0,
220, 0, 0, 0, 168, 1,
0, 0, 36, 2, 0, 0,
220, 4, 0, 0, 80, 5,
0, 0, 65, 111, 110, 57,
156, 0, 0, 0, 156, 0,
0, 0, 0, 2, 255, 255,
104, 0, 0, 0, 52, 0,
0, 0, 1, 0, 40, 0,
0, 0, 52, 0, 0, 0,
52, 0, 1, 0, 36, 0,
0, 0, 52, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 255, 255,
31, 0, 0, 2, 0, 0,
0, 128, 0, 0, 3, 176,
31, 0, 0, 2, 0, 0,
0, 128, 1, 0, 15, 176,
31, 0, 0, 2, 0, 0,
0, 144, 0, 8, 15, 160,
66, 0, 0, 3, 0, 0,
15, 128, 0, 0, 228, 176,
0, 8, 228, 160, 5, 0,
0, 3, 0, 0, 7, 128,
0, 0, 228, 128, 0, 0,
255, 160, 5, 0, 0, 3,
0, 0, 15, 128, 0, 0,
228, 128, 1, 0, 228, 176,
1, 0, 0, 2, 0, 8,
15, 128, 0, 0, 228, 128,
255, 255, 0, 0, 83, 72,
68, 82, 196, 0, 0, 0,
64, 0, 0, 0, 49, 0,
0, 0, 89, 0, 0, 4,
70, 142, 32, 0, 0, 0,
0, 0, 1, 0, 0, 0,
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, 98, 16,
0, 3, 242, 16, 16, 0,
2, 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, 9, 242, 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,
56, 0, 0, 8, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 246, 143, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 56, 0, 0, 7,
242, 32, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 70, 30,
16, 0, 2, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
4, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 2, 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, 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, 82, 68, 69, 70,
176, 2, 0, 0, 1, 0,
0, 0, 156, 0, 0, 0,
3, 0, 0, 0, 28, 0,
0, 0, 0, 4, 255, 255,
0, 1, 0, 0, 133, 2,
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, 135, 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, 13, 0, 0, 0,
146, 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, 116, 104, 101, 83,
97, 109, 112, 108, 101, 114,
0, 116, 104, 101, 84, 101,
120, 116, 117, 114, 101, 0,
67, 111, 110, 115, 116, 97,
110, 116, 115, 0, 146, 0,
0, 0, 12, 0, 0, 0,
180, 0, 0, 0, 96, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 212, 1,
0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 244, 1,
0, 0, 4, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 1, 2,
0, 0, 8, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 12, 2,
0, 0, 12, 0, 0, 0,
4, 0, 0, 0, 2, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 24, 2,
0, 0, 16, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 39, 2,
0, 0, 20, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 55, 2,
0, 0, 24, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 71, 2,
0, 0, 28, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 228, 1, 0, 0,
0, 0, 0, 0, 87, 2,
0, 0, 32, 0, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 96, 2, 0, 0,
0, 0, 0, 0, 112, 2,
0, 0, 48, 0, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 96, 2, 0, 0,
0, 0, 0, 0, 119, 2,
0, 0, 64, 0, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 96, 2, 0, 0,
0, 0, 0, 0, 126, 2,
0, 0, 80, 0, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 96, 2, 0, 0,
0, 0, 0, 0, 115, 99,
82, 71, 66, 95, 111, 117,
116, 112, 117, 116, 0, 171,
171, 171, 0, 0, 3, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0,
116, 101, 120, 116, 117, 114,
101, 95, 116, 121, 112, 101,
0, 105, 110, 112, 117, 116,
95, 116, 121, 112, 101, 0,
99, 111, 108, 111, 114, 95,
115, 99, 97, 108, 101, 0,
116, 111, 110, 101, 109, 97,
112, 95, 109, 101, 116, 104,
111, 100, 0, 116, 111, 110,
101, 109, 97, 112, 95, 102,
97, 99, 116, 111, 114, 49,
0, 116, 111, 110, 101, 109,
97, 112, 95, 102, 97, 99,
116, 111, 114, 50, 0, 115,
100, 114, 95, 119, 104, 105,
116, 101, 95, 112, 111, 105,
110, 116, 0, 89, 111, 102,
102, 115, 101, 116, 0, 171,
1, 0, 3, 0, 1, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 82, 99,
111, 101, 102, 102, 0, 71,
99, 111, 101, 102, 102, 0,
66, 99, 111, 101, 102, 102,
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,
49, 48, 46, 49, 0, 171,
171, 171, 73, 83, 71, 78,
108, 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, 3, 3, 0, 0,
101, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 2, 0,
0, 0, 15, 15, 0, 0,
83, 86, 95, 80, 79, 83,
73, 84, 73, 79, 78, 0,
84, 69, 88, 67, 79, 79,
82, 68, 0, 67, 79, 76,
79, 82, 0, 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
68, 88, 66, 67, 98, 171,
127, 123, 23, 170, 245, 47,
35, 199, 24, 186, 200, 109,
190, 201, 1, 0, 0, 0,
160, 5, 0, 0, 6, 0,
0, 0, 56, 0, 0, 0,
220, 0, 0, 0, 168, 1,
0, 0, 36, 2, 0, 0,
248, 4, 0, 0, 108, 5,
0, 0, 65, 111, 110, 57,
156, 0, 0, 0, 156, 0,
0, 0, 0, 2, 255, 255,
104, 0, 0, 0, 52, 0,
0, 0, 1, 0, 40, 0,
0, 0, 52, 0, 0, 0,
52, 0, 1, 0, 36, 0,
0, 0, 52, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 255, 255,
31, 0, 0, 2, 0, 0,
0, 128, 0, 0, 3, 176,
31, 0, 0, 2, 0, 0,
0, 128, 1, 0, 15, 176,
31, 0, 0, 2, 0, 0,
0, 144, 0, 8, 15, 160,
66, 0, 0, 3, 0, 0,
15, 128, 0, 0, 228, 176,
0, 8, 228, 160, 5, 0,
0, 3, 0, 0, 7, 128,
0, 0, 228, 128, 0, 0,
255, 160, 5, 0, 0, 3,
0, 0, 15, 128, 0, 0,
228, 128, 1, 0, 228, 176,
1, 0, 0, 2, 0, 8,
15, 128, 0, 0, 228, 128,
255, 255, 0, 0, 83, 72,
68, 82, 196, 0, 0, 0,
64, 0, 0, 0, 49, 0,
0, 0, 89, 0, 0, 4,
70, 142, 32, 0, 0, 0,
0, 0, 1, 0, 0, 0,
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, 98, 16,
0, 3, 242, 16, 16, 0,
2, 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, 9, 242, 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,
56, 0, 0, 8, 114, 0,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 246, 143, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 56, 0, 0, 7,
242, 32, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 70, 30,
16, 0, 2, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
4, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 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, 0, 4, 0, 0, 0,
2, 0, 0, 0, 248, 1,
0, 0, 0, 0, 0, 0,
44, 2, 0, 0, 16, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 56, 2,
0, 0, 0, 0, 0, 0,
72, 2, 0, 0, 32, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 248, 1,
0, 0, 0, 0, 0, 0,
87, 2, 0, 0, 36, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 248, 1,
0, 0, 0, 0, 0, 0,
103, 2, 0, 0, 40, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 248, 1,
0, 0, 0, 0, 0, 0,
119, 2, 0, 0, 44, 0,
0, 0, 4, 0, 0, 0,
0, 0, 0, 0, 248, 1,
0, 0, 0, 0, 0, 0,
135, 2, 0, 0, 48, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 56, 2,
0, 0, 0, 0, 0, 0,
143, 2, 0, 0, 64, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 56, 2,
0, 0, 0, 0, 0, 0,
150, 2, 0, 0, 80, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 56, 2,
0, 0, 0, 0, 0, 0,
157, 2, 0, 0, 96, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 56, 2,
0, 0, 0, 0, 0, 0,
115, 99, 82, 71, 66, 95,
111, 117, 116, 112, 117, 116,
0, 171, 171, 171, 0, 0,
3, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 116, 101, 120, 116,
117, 114, 101, 95, 116, 121,
112, 101, 0, 105, 110, 112,
117, 116, 95, 116, 121, 112,
101, 0, 99, 111, 108, 111,
114, 95, 115, 99, 97, 108,
101, 0, 116, 101, 120, 101,
108, 95, 115, 105, 122, 101,
0, 171, 1, 0, 3, 0,
1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0,
116, 111, 110, 101, 109, 97,
112, 95, 109, 101, 116, 104,
111, 100, 0, 116, 111, 110,
101, 109, 97, 112, 95, 102,
97, 99, 116, 111, 114, 49,
0, 116, 111, 110, 101, 109,
97, 112, 95, 102, 97, 99,
116, 111, 114, 50, 0, 115,
100, 114, 95, 119, 104, 105,
116, 101, 95, 112, 111, 105,
110, 116, 0, 89, 111, 102,
102, 115, 101, 116, 0, 82,
99, 111, 101, 102, 102, 0,
71, 99, 111, 101, 102, 102,
0, 66, 99, 111, 101, 102,
102, 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, 49, 48, 46, 49, 0,
73, 83, 71, 78, 108, 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,
3, 3, 0, 0, 101, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 2, 0, 0, 0,
15, 15, 0, 0, 83, 86,
95, 80, 79, 83, 73, 84,
73, 79, 78, 0, 84, 69,
88, 67, 79, 79, 82, 68,
0, 67, 79, 76, 79, 82,
0, 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
};
@@ -1,9 +1,7 @@
Texture2D theTexture : register(t0);
SamplerState theSampler : register(s0);
#include "D3D11_PixelShader_Common.hlsli"
float4 main(PixelShaderInput input) : SV_TARGET
{
return GetOutputColor(theTexture.Sample(theSampler, input.tex)) * input.color;
return GetOutputColor(texture0.Sample(sampler0, input.tex)) * input.color;
}
@@ -3,7 +3,7 @@
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions:
// Buffer Definitions:
//
// cbuffer VertexShaderConstants
// {
@@ -18,7 +18,7 @@
//
// Name Type Format Dim HLSL Bind Count
// ------------------------------ ---------- ------- ----------- -------------- ------
// VertexShaderConstants cbuffer NA NA cb0 1
// VertexShaderConstants cbuffer NA NA cb0 1
//
//
//
@@ -26,8 +26,8 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
// TEXCOORD 0 xy 1 NONE float xy
// POSITION 0 xyz 0 NONE float xyz
// TEXCOORD 0 xy 1 NONE float xy
// COLOR 0 xyzw 2 NONE float xyzw
//
//
@@ -36,7 +36,7 @@
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 0 xy 1 NONE float xy
// COLOR 0 xyzw 2 NONE float xyzw
//
//
@@ -93,247 +93,247 @@ mad r1.xyzw, r0.zzzz, cb0[6].xyzw, r1.xyzw
mad o0.xyzw, r0.wwww, cb0[7].xyzw, r1.xyzw
mov o1.xy, v1.xyxx
mov o2.xyzw, v2.xyzw
ret
ret
// Approximately 11 instruction slots used
#endif
const BYTE g_main[] =
{
68, 88, 66, 67, 152, 172,
81, 45, 198, 200, 12, 38,
143, 4, 178, 228, 158, 175,
169, 64, 1, 0, 0, 0,
140, 5, 0, 0, 6, 0,
0, 0, 56, 0, 0, 0,
108, 1, 0, 0, 52, 3,
0, 0, 176, 3, 0, 0,
168, 4, 0, 0, 24, 5,
0, 0, 65, 111, 110, 57,
44, 1, 0, 0, 44, 1,
0, 0, 0, 2, 254, 255,
248, 0, 0, 0, 52, 0,
0, 0, 1, 0, 36, 0,
0, 0, 48, 0, 0, 0,
48, 0, 0, 0, 36, 0,
1, 0, 48, 0, 0, 0,
0, 0, 8, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 2, 254, 255,
31, 0, 0, 2, 5, 0,
0, 128, 0, 0, 15, 144,
31, 0, 0, 2, 5, 0,
1, 128, 1, 0, 15, 144,
31, 0, 0, 2, 5, 0,
2, 128, 2, 0, 15, 144,
5, 0, 0, 3, 0, 0,
15, 128, 0, 0, 85, 144,
2, 0, 228, 160, 4, 0,
0, 4, 0, 0, 15, 128,
0, 0, 0, 144, 1, 0,
228, 160, 0, 0, 228, 128,
4, 0, 0, 4, 0, 0,
15, 128, 0, 0, 170, 144,
3, 0, 228, 160, 0, 0,
228, 128, 2, 0, 0, 3,
0, 0, 15, 128, 0, 0,
228, 128, 4, 0, 228, 160,
5, 0, 0, 3, 1, 0,
15, 128, 0, 0, 85, 128,
6, 0, 228, 160, 4, 0,
0, 4, 1, 0, 15, 128,
0, 0, 0, 128, 5, 0,
228, 160, 1, 0, 228, 128,
4, 0, 0, 4, 1, 0,
15, 128, 0, 0, 170, 128,
7, 0, 228, 160, 1, 0,
228, 128, 4, 0, 0, 4,
0, 0, 15, 128, 0, 0,
255, 128, 8, 0, 228, 160,
1, 0, 228, 128, 4, 0,
0, 4, 0, 0, 3, 192,
0, 0, 255, 128, 0, 0,
228, 160, 0, 0, 228, 128,
1, 0, 0, 2, 0, 0,
12, 192, 0, 0, 228, 128,
1, 0, 0, 2, 0, 0,
3, 224, 1, 0, 228, 144,
1, 0, 0, 2, 1, 0,
15, 224, 2, 0, 228, 144,
255, 255, 0, 0, 83, 72,
68, 82, 192, 1, 0, 0,
64, 0, 1, 0, 112, 0,
0, 0, 89, 0, 0, 4,
70, 142, 32, 0, 0, 0,
0, 0, 8, 0, 0, 0,
95, 0, 0, 3, 114, 16,
16, 0, 0, 0, 0, 0,
95, 0, 0, 3, 50, 16,
16, 0, 1, 0, 0, 0,
95, 0, 0, 3, 242, 16,
16, 0, 2, 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, 101, 0,
0, 3, 242, 32, 16, 0,
2, 0, 0, 0, 104, 0,
0, 2, 2, 0, 0, 0,
56, 0, 0, 8, 242, 0,
16, 0, 0, 0, 0, 0,
86, 21, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 1, 0,
0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 0, 0,
0, 0, 6, 16, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0,
166, 26, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 2, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 0, 0,
0, 8, 242, 0, 16, 0,
0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 3, 0, 0, 0,
56, 0, 0, 8, 242, 0,
16, 0, 1, 0, 0, 0,
86, 5, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 5, 0,
0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 1, 0,
0, 0, 6, 0, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
4, 0, 0, 0, 70, 14,
16, 0, 1, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 1, 0, 0, 0,
166, 10, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 6, 0,
0, 0, 70, 14, 16, 0,
1, 0, 0, 0, 50, 0,
0, 10, 242, 32, 16, 0,
0, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 7, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
50, 32, 16, 0, 1, 0,
0, 0, 70, 16, 16, 0,
1, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
2, 0, 0, 0, 70, 30,
16, 0, 2, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
11, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
6, 0, 0, 0, 8, 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, 0, 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, 82, 68, 69, 70,
240, 0, 0, 0, 1, 0,
0, 0, 84, 0, 0, 0,
1, 0, 0, 0, 28, 0,
0, 0, 0, 4, 254, 255,
0, 1, 0, 0, 198, 0,
0, 0, 60, 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, 86, 101,
114, 116, 101, 120, 83, 104,
97, 100, 101, 114, 67, 111,
110, 115, 116, 97, 110, 116,
115, 0, 171, 171, 60, 0,
0, 0, 2, 0, 0, 0,
108, 0, 0, 0, 128, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 156, 0,
0, 0, 0, 0, 0, 0,
64, 0, 0, 0, 2, 0,
0, 0, 164, 0, 0, 0,
0, 0, 0, 0, 180, 0,
0, 0, 64, 0, 0, 0,
64, 0, 0, 0, 2, 0,
0, 0, 164, 0, 0, 0,
0, 0, 0, 0, 109, 111,
100, 101, 108, 0, 171, 171,
2, 0, 3, 0, 4, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 112, 114,
111, 106, 101, 99, 116, 105,
111, 110, 65, 110, 100, 86,
105, 101, 119, 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, 49, 48, 46,
49, 0, 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, 0, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 7, 7,
0, 0, 89, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
1, 0, 0, 0, 3, 3,
0, 0, 98, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
2, 0, 0, 0, 15, 15,
0, 0, 80, 79, 83, 73,
84, 73, 79, 78, 0, 84,
69, 88, 67, 79, 79, 82,
68, 0, 67, 79, 76, 79,
82, 0, 79, 83, 71, 78,
108, 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, 3, 12, 0, 0,
101, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 2, 0,
0, 0, 15, 0, 0, 0,
83, 86, 95, 80, 79, 83,
73, 84, 73, 79, 78, 0,
84, 69, 88, 67, 79, 79,
82, 68, 0, 67, 79, 76,
68, 88, 66, 67, 152, 172,
81, 45, 198, 200, 12, 38,
143, 4, 178, 228, 158, 175,
169, 64, 1, 0, 0, 0,
140, 5, 0, 0, 6, 0,
0, 0, 56, 0, 0, 0,
108, 1, 0, 0, 52, 3,
0, 0, 176, 3, 0, 0,
168, 4, 0, 0, 24, 5,
0, 0, 65, 111, 110, 57,
44, 1, 0, 0, 44, 1,
0, 0, 0, 2, 254, 255,
248, 0, 0, 0, 52, 0,
0, 0, 1, 0, 36, 0,
0, 0, 48, 0, 0, 0,
48, 0, 0, 0, 36, 0,
1, 0, 48, 0, 0, 0,
0, 0, 8, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 2, 254, 255,
31, 0, 0, 2, 5, 0,
0, 128, 0, 0, 15, 144,
31, 0, 0, 2, 5, 0,
1, 128, 1, 0, 15, 144,
31, 0, 0, 2, 5, 0,
2, 128, 2, 0, 15, 144,
5, 0, 0, 3, 0, 0,
15, 128, 0, 0, 85, 144,
2, 0, 228, 160, 4, 0,
0, 4, 0, 0, 15, 128,
0, 0, 0, 144, 1, 0,
228, 160, 0, 0, 228, 128,
4, 0, 0, 4, 0, 0,
15, 128, 0, 0, 170, 144,
3, 0, 228, 160, 0, 0,
228, 128, 2, 0, 0, 3,
0, 0, 15, 128, 0, 0,
228, 128, 4, 0, 228, 160,
5, 0, 0, 3, 1, 0,
15, 128, 0, 0, 85, 128,
6, 0, 228, 160, 4, 0,
0, 4, 1, 0, 15, 128,
0, 0, 0, 128, 5, 0,
228, 160, 1, 0, 228, 128,
4, 0, 0, 4, 1, 0,
15, 128, 0, 0, 170, 128,
7, 0, 228, 160, 1, 0,
228, 128, 4, 0, 0, 4,
0, 0, 15, 128, 0, 0,
255, 128, 8, 0, 228, 160,
1, 0, 228, 128, 4, 0,
0, 4, 0, 0, 3, 192,
0, 0, 255, 128, 0, 0,
228, 160, 0, 0, 228, 128,
1, 0, 0, 2, 0, 0,
12, 192, 0, 0, 228, 128,
1, 0, 0, 2, 0, 0,
3, 224, 1, 0, 228, 144,
1, 0, 0, 2, 1, 0,
15, 224, 2, 0, 228, 144,
255, 255, 0, 0, 83, 72,
68, 82, 192, 1, 0, 0,
64, 0, 1, 0, 112, 0,
0, 0, 89, 0, 0, 4,
70, 142, 32, 0, 0, 0,
0, 0, 8, 0, 0, 0,
95, 0, 0, 3, 114, 16,
16, 0, 0, 0, 0, 0,
95, 0, 0, 3, 50, 16,
16, 0, 1, 0, 0, 0,
95, 0, 0, 3, 242, 16,
16, 0, 2, 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, 101, 0,
0, 3, 242, 32, 16, 0,
2, 0, 0, 0, 104, 0,
0, 2, 2, 0, 0, 0,
56, 0, 0, 8, 242, 0,
16, 0, 0, 0, 0, 0,
86, 21, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 1, 0,
0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 0, 0,
0, 0, 6, 16, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0,
166, 26, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 2, 0,
0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 0, 0,
0, 8, 242, 0, 16, 0,
0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 3, 0, 0, 0,
56, 0, 0, 8, 242, 0,
16, 0, 1, 0, 0, 0,
86, 5, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 5, 0,
0, 0, 50, 0, 0, 10,
242, 0, 16, 0, 1, 0,
0, 0, 6, 0, 16, 0,
0, 0, 0, 0, 70, 142,
32, 0, 0, 0, 0, 0,
4, 0, 0, 0, 70, 14,
16, 0, 1, 0, 0, 0,
50, 0, 0, 10, 242, 0,
16, 0, 1, 0, 0, 0,
166, 10, 16, 0, 0, 0,
0, 0, 70, 142, 32, 0,
0, 0, 0, 0, 6, 0,
0, 0, 70, 14, 16, 0,
1, 0, 0, 0, 50, 0,
0, 10, 242, 32, 16, 0,
0, 0, 0, 0, 246, 15,
16, 0, 0, 0, 0, 0,
70, 142, 32, 0, 0, 0,
0, 0, 7, 0, 0, 0,
70, 14, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
50, 32, 16, 0, 1, 0,
0, 0, 70, 16, 16, 0,
1, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
2, 0, 0, 0, 70, 30,
16, 0, 2, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
11, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
6, 0, 0, 0, 8, 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, 0, 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, 82, 68, 69, 70,
240, 0, 0, 0, 1, 0,
0, 0, 84, 0, 0, 0,
1, 0, 0, 0, 28, 0,
0, 0, 0, 4, 254, 255,
0, 1, 0, 0, 198, 0,
0, 0, 60, 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, 86, 101,
114, 116, 101, 120, 83, 104,
97, 100, 101, 114, 67, 111,
110, 115, 116, 97, 110, 116,
115, 0, 171, 171, 60, 0,
0, 0, 2, 0, 0, 0,
108, 0, 0, 0, 128, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 156, 0,
0, 0, 0, 0, 0, 0,
64, 0, 0, 0, 2, 0,
0, 0, 164, 0, 0, 0,
0, 0, 0, 0, 180, 0,
0, 0, 64, 0, 0, 0,
64, 0, 0, 0, 2, 0,
0, 0, 164, 0, 0, 0,
0, 0, 0, 0, 109, 111,
100, 101, 108, 0, 171, 171,
2, 0, 3, 0, 4, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 112, 114,
111, 106, 101, 99, 116, 105,
111, 110, 65, 110, 100, 86,
105, 101, 119, 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, 49, 48, 46,
49, 0, 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, 0, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 7, 7,
0, 0, 89, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
1, 0, 0, 0, 3, 3,
0, 0, 98, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
2, 0, 0, 0, 15, 15,
0, 0, 80, 79, 83, 73,
84, 73, 79, 78, 0, 84,
69, 88, 67, 79, 79, 82,
68, 0, 67, 79, 76, 79,
82, 0, 79, 83, 71, 78,
108, 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, 3, 12, 0, 0,
101, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 2, 0,
0, 0, 15, 0, 0, 0,
83, 86, 95, 80, 79, 83,
73, 84, 73, 79, 78, 0,
84, 69, 88, 67, 79, 79,
82, 68, 0, 67, 79, 76,
79, 82, 0, 171
};
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -28,8 +28,6 @@
#include "SDL_shaders_d3d11.h"
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
#if SDL_WINAPI_FAMILY_PHONE
#error Need to build shaders with level_9_3
#endif
@@ -82,7 +80,7 @@ bool D3D11_CreateVertexShader(ID3D11Device1 *d3dDevice, ID3D11VertexShader **ver
NULL,
vertexShader);
if (FAILED(result)) {
return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateVertexShader"), result);
return WIN_SetErrorFromHRESULT("ID3D11Device1::CreateVertexShader", result);
}
// Create an input layout for SDL's vertex shader:
@@ -93,7 +91,7 @@ bool D3D11_CreateVertexShader(ID3D11Device1 *d3dDevice, ID3D11VertexShader **ver
sizeof(D3D11_VertexShader),
inputLayout);
if (FAILED(result)) {
return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateInputLayout"), result);
return WIN_SetErrorFromHRESULT("ID3D11Device1::CreateInputLayout", result);
}
return true;
}
@@ -108,7 +106,7 @@ bool D3D11_CreatePixelShader(ID3D11Device1 *d3dDevice, D3D11_Shader shader, ID3D
NULL,
pixelShader);
if (FAILED(result)) {
return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreatePixelShader"), result);
return WIN_SetErrorFromHRESULT("ID3D11Device1::CreatePixelShader", result);
}
return true;
}
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages