1 module shaders.mrt;
2 import sg = sokol.gfx;
3 import m = handmade.math;
4 extern(C):
5 
6 /*
7     #version:1# (machine generated, don't edit!)
8 
9     Generated by sokol-shdc (https://github.com/floooh/sokol-tools)
10 
11     Cmdline:
12         sokol-shdc -i src/examples/shaders/mrt.glsl -o src/examples/shaders/mrt.d -l glsl410:metal_macos:hlsl5:glsl300es:wgsl -f sokol_d
13 
14     Overview:
15     =========
16     Shader program: 'dbg':
17         Get shader desc: dbgShaderDesc(sg.queryBackend());
18         Vertex Shader: vs_dbg
19         Fragment Shader: fs_dbg
20         Attributes:
21             ATTR_DBG_POS => 0
22     Shader program: 'fsq':
23         Get shader desc: fsqShaderDesc(sg.queryBackend());
24         Vertex Shader: vs_fsq
25         Fragment Shader: fs_fsq
26         Attributes:
27             ATTR_FSQ_POS => 0
28     Shader program: 'offscreen':
29         Get shader desc: offscreenShaderDesc(sg.queryBackend());
30         Vertex Shader: vs_offscreen
31         Fragment Shader: fs_offscreen
32         Attributes:
33             ATTR_OFFSCREEN_POS => 0
34             ATTR_OFFSCREEN_BRIGHT0 => 1
35     Bindings:
36         Uniform block 'fsq_params':
37             D struct: FsqParams
38             Bind slot: UB_FSQ_PARAMS => 0
39         Uniform block 'offscreen_params':
40             D struct: OffscreenParams
41             Bind slot: UB_OFFSCREEN_PARAMS => 0
42         Image 'tex':
43             Image type: sg.ImageType._2d
44             Sample type: sg.ImageSampleType.Float
45             Multisampled: false
46             Bind slot: IMG_TEX => 0
47         Image 'tex0':
48             Image type: sg.ImageType._2d
49             Sample type: sg.ImageSampleType.Float
50             Multisampled: false
51             Bind slot: IMG_TEX0 => 0
52         Image 'tex1':
53             Image type: sg.ImageType._2d
54             Sample type: sg.ImageSampleType.Float
55             Multisampled: false
56             Bind slot: IMG_TEX1 => 1
57         Image 'tex2':
58             Image type: sg.ImageType._2d
59             Sample type: sg.ImageSampleType.Float
60             Multisampled: false
61             Bind slot: IMG_TEX2 => 2
62         Sampler 'smp':
63             Type: sg.SamplerType.Filtering
64             Bind slot: SMP_SMP => 0
65         Image Sampler Pair 'tex_smp':
66             Image: tex
67             Sampler: smp
68         Image Sampler Pair 'tex0_smp':
69             Image: tex0
70             Sampler: smp
71         Image Sampler Pair 'tex1_smp':
72             Image: tex1
73             Sampler: smp
74         Image Sampler Pair 'tex2_smp':
75             Image: tex2
76             Sampler: smp
77 */
78 enum ATTR_DBG_POS = 0;
79 enum ATTR_FSQ_POS = 0;
80 enum ATTR_OFFSCREEN_POS = 0;
81 enum ATTR_OFFSCREEN_BRIGHT0 = 1;
82 enum UB_FSQ_PARAMS = 0;
83 enum UB_OFFSCREEN_PARAMS = 0;
84 enum IMG_TEX = 0;
85 enum IMG_TEX0 = 0;
86 enum IMG_TEX1 = 1;
87 enum IMG_TEX2 = 2;
88 enum SMP_SMP = 0;
89 struct FsqParams {
90     align(16) m.Vec2 offset;
91     align(1) ubyte[8] _pad_8 = 0;
92 }
93 struct OffscreenParams {
94     align(16) m.Mat4 mvp;
95 }
96 /*
97     #version 410
98 
99     uniform vec4 offscreen_params[4];
100     layout(location = 0) in vec4 pos;
101     layout(location = 0) out float bright;
102     layout(location = 1) in float bright0;
103 
104     void main()
105     {
106         gl_Position = mat4(offscreen_params[0], offscreen_params[1], offscreen_params[2], offscreen_params[3]) * pos;
107         bright = bright0;
108     }
109 
110 */
111 __gshared char[315] VS_OFFSCREEN_SOURCE_GLSL410 = [
112     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
113     0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x6f,0x66,0x66,0x73,0x63,
114     0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,
115     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
116     0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,
117     0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
118     0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,
119     0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
120     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,
121     0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x3b,0x0a,
122     0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,
123     0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
124     0x20,0x6d,0x61,0x74,0x34,0x28,0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
125     0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x6f,0x66,0x66,0x73,0x63,
126     0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,
127     0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
128     0x5b,0x32,0x5d,0x2c,0x20,0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,
129     0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x3b,
130     0x0a,0x20,0x20,0x20,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x62,0x72,
131     0x69,0x67,0x68,0x74,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
132 ];
133 /*
134     #version 410
135 
136     layout(location = 0) out vec4 frag_color_0;
137     layout(location = 0) in float bright;
138     layout(location = 1) out vec4 frag_color_1;
139     layout(location = 2) out vec4 frag_color_2;
140 
141     void main()
142     {
143         frag_color_0 = vec4(bright, 0.0, 0.0, 1.0);
144         frag_color_1 = vec4(0.0, bright, 0.0, 1.0);
145         frag_color_2 = vec4(0.0, 0.0, bright, 1.0);
146     }
147 
148 */
149 __gshared char[347] FS_OFFSCREEN_SOURCE_GLSL410 = [
150     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x6c,0x61,
151     0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
152     0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
153     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
154     0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,
155     0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x3b,0x0a,
156     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
157     0x3d,0x20,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,
158     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
159     0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,
160     0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
161     0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,
162     0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
163     0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x62,
164     0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,
165     0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
166     0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,
167     0x2e,0x30,0x2c,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x30,0x2e,0x30,0x2c,
168     0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
169     0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,
170     0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,
171     0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
172 ];
173 /*
174     #version 410
175 
176     uniform vec4 fsq_params[1];
177     layout(location = 0) in vec2 pos;
178     layout(location = 0) out vec2 uv0;
179     layout(location = 1) out vec2 uv1;
180     layout(location = 2) out vec2 uv2;
181 
182     void main()
183     {
184         gl_Position = vec4((pos * 2.0) - vec2(1.0), 0.5, 1.0);
185         uv0 = pos + vec2(fsq_params[0].x, 0.0);
186         uv1 = pos + vec2(0.0, fsq_params[0].y);
187         uv2 = pos;
188         gl_Position.y = -gl_Position.y;
189     }
190 
191 */
192 __gshared char[398] VS_FSQ_SOURCE_GLSL410 = [
193     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
194     0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x73,0x71,0x5f,0x70,
195     0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
196     0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,
197     0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
198     0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,
199     0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x30,0x3b,0x0a,0x6c,
200     0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
201     0x20,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x31,
202     0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
203     0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,
204     0x75,0x76,0x32,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,
205     0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
206     0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x70,0x6f,0x73,0x20,
207     0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,
208     0x30,0x29,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
209     0x20,0x20,0x20,0x75,0x76,0x30,0x20,0x3d,0x20,0x70,0x6f,0x73,0x20,0x2b,0x20,0x76,
210     0x65,0x63,0x32,0x28,0x66,0x73,0x71,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,
211     0x5d,0x2e,0x78,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,
212     0x76,0x31,0x20,0x3d,0x20,0x70,0x6f,0x73,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,
213     0x30,0x2e,0x30,0x2c,0x20,0x66,0x73,0x71,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
214     0x30,0x5d,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x32,0x20,0x3d,
215     0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,
216     0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x20,0x3d,0x20,0x2d,0x67,0x6c,0x5f,0x50,0x6f,
217     0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
218 ];
219 /*
220     #version 410
221 
222     uniform sampler2D tex0_smp;
223     uniform sampler2D tex1_smp;
224     uniform sampler2D tex2_smp;
225 
226     layout(location = 0) in vec2 uv0;
227     layout(location = 1) in vec2 uv1;
228     layout(location = 2) in vec2 uv2;
229     layout(location = 0) out vec4 frag_color;
230 
231     void main()
232     {
233         frag_color = vec4((texture(tex0_smp, uv0).xyz + texture(tex1_smp, uv1).xyz) + texture(tex2_smp, uv2).xyz, 1.0);
234     }
235 
236 */
237 __gshared char[378] FS_FSQ_SOURCE_GLSL410 = [
238     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
239     0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
240     0x74,0x65,0x78,0x30,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,
241     0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x31,
242     0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,
243     0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x32,0x5f,0x73,0x6d,0x70,
244     0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
245     0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,
246     0x75,0x76,0x30,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
247     0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
248     0x32,0x20,0x75,0x76,0x31,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
249     0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,
250     0x65,0x63,0x32,0x20,0x75,0x76,0x32,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
251     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,
252     0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
253     0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
254     0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
255     0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
256     0x28,0x74,0x65,0x78,0x30,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x30,0x29,0x2e,
257     0x78,0x79,0x7a,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,
258     0x78,0x31,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x31,0x29,0x2e,0x78,0x79,0x7a,
259     0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x32,
260     0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x32,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,
261     0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
262 ];
263 /*
264     #version 410
265 
266     layout(location = 0) in vec2 pos;
267     layout(location = 0) out vec2 uv;
268 
269     void main()
270     {
271         gl_Position = vec4((pos * 2.0) - vec2(1.0), 0.5, 1.0);
272         uv = pos;
273         gl_Position.y = -gl_Position.y;
274     }
275 
276 */
277 __gshared char[210] VS_DBG_SOURCE_GLSL410 = [
278     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x6c,0x61,
279     0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
280     0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,0x73,0x3b,0x0a,
281     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
282     0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,
283     0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
284     0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
285     0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x70,0x6f,0x73,0x20,0x2a,0x20,0x32,
286     0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,
287     0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
288     0x75,0x76,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,
289     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x20,0x3d,0x20,0x2d,0x67,
290     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x3b,0x0a,0x7d,0x0a,
291     0x0a,0x00,
292 ];
293 /*
294     #version 410
295 
296     uniform sampler2D tex_smp;
297 
298     layout(location = 0) out vec4 frag_color;
299     layout(location = 0) in vec2 uv;
300 
301     void main()
302     {
303         frag_color = vec4(texture(tex_smp, uv).xyz, 1.0);
304     }
305 
306 */
307 __gshared char[190] FS_DBG_SOURCE_GLSL410 = [
308     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
309     0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
310     0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
311     0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,
312     0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
313     0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,
314     0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,
315     0x20,0x75,0x76,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,
316     0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
317     0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x74,0x65,0x78,0x74,0x75,0x72,
318     0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,0x78,
319     0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
320 ];
321 /*
322     #version 300 es
323 
324     uniform vec4 offscreen_params[4];
325     layout(location = 0) in vec4 pos;
326     out float bright;
327     layout(location = 1) in float bright0;
328 
329     void main()
330     {
331         gl_Position = mat4(offscreen_params[0], offscreen_params[1], offscreen_params[2], offscreen_params[3]) * pos;
332         bright = bright0;
333     }
334 
335 */
336 __gshared char[297] VS_OFFSCREEN_SOURCE_GLSL300ES = [
337     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
338     0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x6f,0x66,
339     0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,
340     0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
341     0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,
342     0x70,0x6f,0x73,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,
343     0x72,0x69,0x67,0x68,0x74,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
344     0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x66,
345     0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x3b,0x0a,0x0a,0x76,
346     0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
347     0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,
348     0x61,0x74,0x34,0x28,0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,
349     0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x6f,0x66,0x66,0x73,0x63,0x72,0x65,
350     0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x6f,0x66,
351     0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,
352     0x5d,0x2c,0x20,0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,
353     0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,
354     0x20,0x20,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x62,0x72,0x69,0x67,
355     0x68,0x74,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
356 ];
357 /*
358     #version 300 es
359     precision mediump float;
360     precision highp int;
361 
362     layout(location = 0) out highp vec4 frag_color_0;
363     in highp float bright;
364     layout(location = 1) out highp vec4 frag_color_1;
365     layout(location = 2) out highp vec4 frag_color_2;
366 
367     void main()
368     {
369         frag_color_0 = vec4(bright, 0.0, 0.0, 1.0);
370         frag_color_1 = vec4(0.0, bright, 0.0, 1.0);
371         frag_color_2 = vec4(0.0, 0.0, bright, 1.0);
372     }
373 
374 */
375 __gshared char[399] FS_OFFSCREEN_SOURCE_GLSL300ES = [
376     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
377     0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
378     0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
379     0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x6c,
380     0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
381     0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
382     0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x3b,
383     0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
384     0x62,0x72,0x69,0x67,0x68,0x74,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
385     0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x6f,0x75,0x74,
386     0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
387     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
388     0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x6f,
389     0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,
390     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
391     0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
392     0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x20,0x3d,0x20,0x76,0x65,
393     0x63,0x34,0x28,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
394     0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
395     0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3d,0x20,0x76,0x65,
396     0x63,0x34,0x28,0x30,0x2e,0x30,0x2c,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,
397     0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
398     0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3d,0x20,0x76,0x65,
399     0x63,0x34,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x62,0x72,0x69,
400     0x67,0x68,0x74,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
401 ];
402 /*
403     #version 300 es
404 
405     uniform vec4 fsq_params[1];
406     layout(location = 0) in vec2 pos;
407     out vec2 uv0;
408     out vec2 uv1;
409     out vec2 uv2;
410 
411     void main()
412     {
413         gl_Position = vec4((pos * 2.0) - vec2(1.0), 0.5, 1.0);
414         uv0 = pos + vec2(fsq_params[0].x, 0.0);
415         uv1 = pos + vec2(0.0, fsq_params[0].y);
416         uv2 = pos;
417         gl_Position.y = -gl_Position.y;
418     }
419 
420 */
421 __gshared char[338] VS_FSQ_SOURCE_GLSL300ES = [
422     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
423     0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x73,
424     0x71,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x6c,0x61,0x79,
425     0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,
426     0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x6f,
427     0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x30,0x3b,0x0a,0x6f,0x75,0x74,
428     0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x31,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,
429     0x65,0x63,0x32,0x20,0x75,0x76,0x32,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,
430     0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,
431     0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,
432     0x70,0x6f,0x73,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,
433     0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,
434     0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x30,0x20,0x3d,0x20,0x70,0x6f,0x73,
435     0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x66,0x73,0x71,0x5f,0x70,0x61,0x72,0x61,
436     0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,
437     0x20,0x20,0x20,0x75,0x76,0x31,0x20,0x3d,0x20,0x70,0x6f,0x73,0x20,0x2b,0x20,0x76,
438     0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x66,0x73,0x71,0x5f,0x70,0x61,0x72,
439     0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,
440     0x76,0x32,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,
441     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x20,0x3d,0x20,0x2d,0x67,
442     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x3b,0x0a,0x7d,0x0a,
443     0x0a,0x00,
444 ];
445 /*
446     #version 300 es
447     precision mediump float;
448     precision highp int;
449 
450     uniform highp sampler2D tex0_smp;
451     uniform highp sampler2D tex1_smp;
452     uniform highp sampler2D tex2_smp;
453 
454     in highp vec2 uv0;
455     in highp vec2 uv1;
456     in highp vec2 uv2;
457     layout(location = 0) out highp vec4 frag_color;
458 
459     void main()
460     {
461         frag_color = vec4((texture(tex0_smp, uv0).xyz + texture(tex1_smp, uv1).xyz) + texture(tex2_smp, uv2).xyz, 1.0);
462     }
463 
464 */
465 __gshared char[406] FS_FSQ_SOURCE_GLSL300ES = [
466     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
467     0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
468     0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
469     0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
470     0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
471     0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x30,0x5f,0x73,0x6d,0x70,0x3b,
472     0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,
473     0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x31,0x5f,0x73,0x6d,
474     0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,
475     0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x32,0x5f,
476     0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
477     0x65,0x63,0x32,0x20,0x75,0x76,0x30,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,
478     0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x31,0x3b,0x0a,0x69,0x6e,0x20,0x68,
479     0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x32,0x3b,0x0a,0x6c,
480     0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
481     0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
482     0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,
483     0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,
484     0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,
485     0x65,0x63,0x34,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,
486     0x30,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,
487     0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x31,0x5f,0x73,
488     0x6d,0x70,0x2c,0x20,0x75,0x76,0x31,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,
489     0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x32,0x5f,0x73,0x6d,0x70,
490     0x2c,0x20,0x75,0x76,0x32,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,
491     0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
492 ];
493 /*
494     #version 300 es
495 
496     layout(location = 0) in vec2 pos;
497     out vec2 uv;
498 
499     void main()
500     {
501         gl_Position = vec4((pos * 2.0) - vec2(1.0), 0.5, 1.0);
502         uv = pos;
503         gl_Position.y = -gl_Position.y;
504     }
505 
506 */
507 __gshared char[192] VS_DBG_SOURCE_GLSL300ES = [
508     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
509     0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
510     0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,
511     0x73,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,
512     0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,
513     0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
514     0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x70,0x6f,0x73,0x20,0x2a,0x20,0x32,0x2e,0x30,
515     0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x30,
516     0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,
517     0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,
518     0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x20,0x3d,0x20,0x2d,0x67,0x6c,0x5f,
519     0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x79,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
520 
521 ];
522 /*
523     #version 300 es
524     precision mediump float;
525     precision highp int;
526 
527     uniform highp sampler2D tex_smp;
528 
529     layout(location = 0) out highp vec4 frag_color;
530     in highp vec2 uv;
531 
532     void main()
533     {
534         frag_color = vec4(texture(tex_smp, uv).xyz, 1.0);
535     }
536 
537 */
538 __gshared char[236] FS_DBG_SOURCE_GLSL300ES = [
539     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
540     0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
541     0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
542     0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
543     0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
544     0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,
545     0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
546     0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
547     0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
548     0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,
549     0x76,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
550     0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
551     0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
552     0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x2e,0x78,0x79,0x7a,
553     0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
554 ];
555 /*
556     cbuffer offscreen_params : register(b0)
557     {
558         row_major float4x4 _19_mvp : packoffset(c0);
559     };
560 
561 
562     static float4 gl_Position;
563     static float4 pos;
564     static float bright;
565     static float bright0;
566 
567     struct SPIRV_Cross_Input
568     {
569         float4 pos : TEXCOORD0;
570         float bright0 : TEXCOORD1;
571     };
572 
573     struct SPIRV_Cross_Output
574     {
575         float bright : TEXCOORD0;
576         float4 gl_Position : SV_Position;
577     };
578 
579     void vert_main()
580     {
581         gl_Position = mul(pos, _19_mvp);
582         bright = bright0;
583     }
584 
585     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
586     {
587         pos = stage_input.pos;
588         bright0 = stage_input.bright0;
589         vert_main();
590         SPIRV_Cross_Output stage_output;
591         stage_output.gl_Position = gl_Position;
592         stage_output.bright = bright;
593         return stage_output;
594     }
595 */
596 __gshared char[736] VS_OFFSCREEN_SOURCE_HLSL5 = [
597     0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,
598     0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,
599     0x74,0x65,0x72,0x28,0x62,0x30,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x6f,
600     0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,
601     0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,0x70,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,
602     0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x30,0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x0a,
603     0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,
604     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,
605     0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x73,0x74,
606     0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,
607     0x74,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
608     0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
609     0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,
610     0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
611     0x70,0x6f,0x73,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,
612     0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,
613     0x74,0x30,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,
614     0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,
615     0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,
616     0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,
617     0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,
618     0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
619     0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
620     0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x76,0x65,0x72,
621     0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,
622     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x75,0x6c,
623     0x28,0x70,0x6f,0x73,0x2c,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,0x70,0x29,0x3b,0x0a,
624     0x20,0x20,0x20,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x62,0x72,0x69,
625     0x67,0x68,0x74,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,
626     0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
627     0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,
628     0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,
629     0x7b,0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,
630     0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,
631     0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,
632     0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x3b,0x0a,
633     0x20,0x20,0x20,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,
634     0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,
635     0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,
636     0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,
637     0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
638     0x6f,0x6e,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
639     0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,
640     0x75,0x74,0x2e,0x62,0x72,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x62,0x72,0x69,0x67,
641     0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,
642     0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
643 
644 ];
645 /*
646     static float4 frag_color_0;
647     static float bright;
648     static float4 frag_color_1;
649     static float4 frag_color_2;
650 
651     struct SPIRV_Cross_Input
652     {
653         float bright : TEXCOORD0;
654     };
655 
656     struct SPIRV_Cross_Output
657     {
658         float4 frag_color_0 : SV_Target0;
659         float4 frag_color_1 : SV_Target1;
660         float4 frag_color_2 : SV_Target2;
661     };
662 
663     void frag_main()
664     {
665         frag_color_0 = float4(bright, 0.0f, 0.0f, 1.0f);
666         frag_color_1 = float4(0.0f, bright, 0.0f, 1.0f);
667         frag_color_2 = float4(0.0f, 0.0f, bright, 1.0f);
668     }
669 
670     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
671     {
672         bright = stage_input.bright;
673         frag_main();
674         SPIRV_Cross_Output stage_output;
675         stage_output.frag_color_0 = frag_color_0;
676         stage_output.frag_color_1 = frag_color_1;
677         stage_output.frag_color_2 = frag_color_2;
678         return stage_output;
679     }
680 */
681 __gshared char[804] FS_OFFSCREEN_SOURCE_HLSL5 = [
682     0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,
683     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x3b,0x0a,0x73,0x74,0x61,0x74,
684     0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x3b,
685     0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,
686     0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x3b,0x0a,0x73,0x74,0x61,
687     0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,
688     0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
689     0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,
690     0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,
691     0x72,0x69,0x67,0x68,0x74,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,
692     0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,
693     0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,
694     0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,
695     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x20,0x3a,0x20,0x53,0x56,0x5f,
696     0x54,0x61,0x72,0x67,0x65,0x74,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
697     0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,
698     0x20,0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72,0x67,0x65,0x74,0x31,0x3b,0x0a,0x20,
699     0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
700     0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72,0x67,
701     0x65,0x74,0x32,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x66,0x72,
702     0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
703     0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x20,0x3d,0x20,0x66,
704     0x6c,0x6f,0x61,0x74,0x34,0x28,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x30,0x2e,
705     0x30,0x66,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,
706     0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,
707     0x31,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,0x66,0x2c,
708     0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,0x20,0x31,
709     0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
710     0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,
711     0x30,0x2e,0x30,0x66,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,0x20,0x62,0x72,0x69,0x67,
712     0x68,0x74,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,
713     0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,
714     0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,
715     0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,
716     0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x62,0x72,0x69,0x67,0x68,
717     0x74,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,
718     0x62,0x72,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
719     0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,
720     0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,
721     0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,
722     0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,
723     0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x20,0x3d,0x20,0x66,0x72,
724     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
725     0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,0x72,0x61,
726     0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3d,0x20,0x66,0x72,0x61,0x67,
727     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,
728     0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,
729     0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3d,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
730     0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
731     0x72,0x6e,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,
732     0x0a,0x7d,0x0a,0x00,
733 ];
734 /*
735     cbuffer fsq_params : register(b0)
736     {
737         float2 _36_offset : packoffset(c0);
738     };
739 
740 
741     static float4 gl_Position;
742     static float2 pos;
743     static float2 uv0;
744     static float2 uv1;
745     static float2 uv2;
746 
747     struct SPIRV_Cross_Input
748     {
749         float2 pos : TEXCOORD0;
750     };
751 
752     struct SPIRV_Cross_Output
753     {
754         float2 uv0 : TEXCOORD0;
755         float2 uv1 : TEXCOORD1;
756         float2 uv2 : TEXCOORD2;
757         float4 gl_Position : SV_Position;
758     };
759 
760     void vert_main()
761     {
762         gl_Position = float4((pos * 2.0f) - 1.0f.xx, 0.5f, 1.0f);
763         uv0 = pos + float2(_36_offset.x, 0.0f);
764         uv1 = pos + float2(0.0f, _36_offset.y);
765         uv2 = pos;
766     }
767 
768     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
769     {
770         pos = stage_input.pos;
771         vert_main();
772         SPIRV_Cross_Output stage_output;
773         stage_output.gl_Position = gl_Position;
774         stage_output.uv0 = uv0;
775         stage_output.uv1 = uv1;
776         stage_output.uv2 = uv2;
777         return stage_output;
778     }
779 */
780 __gshared char[879] VS_FSQ_SOURCE_HLSL5 = [
781     0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x66,0x73,0x71,0x5f,0x70,0x61,0x72,0x61,
782     0x6d,0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x62,0x30,
783     0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,
784     0x33,0x36,0x5f,0x6f,0x66,0x66,0x73,0x65,0x74,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,
785     0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x30,0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
786     0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,
787     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,
788     0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x73,
789     0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x30,
790     0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
791     0x75,0x76,0x31,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,
792     0x74,0x32,0x20,0x75,0x76,0x32,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
793     0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,
794     0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,
795     0x6f,0x73,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,
796     0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,
797     0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,
798     0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x30,0x20,0x3a,
799     0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
800     0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x31,0x20,0x3a,0x20,0x54,0x45,0x58,
801     0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
802     0x74,0x32,0x20,0x75,0x76,0x32,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,
803     0x44,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,
804     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,
805     0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,
806     0x69,0x64,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
807     0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
808     0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x70,0x6f,0x73,0x20,0x2a,
809     0x20,0x32,0x2e,0x30,0x66,0x29,0x20,0x2d,0x20,0x31,0x2e,0x30,0x66,0x2e,0x78,0x78,
810     0x2c,0x20,0x30,0x2e,0x35,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,
811     0x20,0x20,0x20,0x75,0x76,0x30,0x20,0x3d,0x20,0x70,0x6f,0x73,0x20,0x2b,0x20,0x66,
812     0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,0x33,0x36,0x5f,0x6f,0x66,0x66,0x73,0x65,0x74,
813     0x2e,0x78,0x2c,0x20,0x30,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,
814     0x76,0x31,0x20,0x3d,0x20,0x70,0x6f,0x73,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,
815     0x32,0x28,0x30,0x2e,0x30,0x66,0x2c,0x20,0x5f,0x33,0x36,0x5f,0x6f,0x66,0x66,0x73,
816     0x65,0x74,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x32,0x20,0x3d,
817     0x20,0x70,0x6f,0x73,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,
818     0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
819     0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,
820     0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,
821     0x7b,0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,
822     0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,
823     0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,
824     0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,
825     0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,
826     0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,
827     0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
828     0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,
829     0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,
830     0x75,0x76,0x30,0x20,0x3d,0x20,0x75,0x76,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,
831     0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x75,0x76,0x31,0x20,
832     0x3d,0x20,0x75,0x76,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,
833     0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x75,0x76,0x32,0x20,0x3d,0x20,0x75,0x76,
834     0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,
835     0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
836 ];
837 /*
838     Texture2D<float4> tex0 : register(t0);
839     SamplerState smp : register(s0);
840     Texture2D<float4> tex1 : register(t1);
841     Texture2D<float4> tex2 : register(t2);
842 
843     static float2 uv0;
844     static float2 uv1;
845     static float2 uv2;
846     static float4 frag_color;
847 
848     struct SPIRV_Cross_Input
849     {
850         float2 uv0 : TEXCOORD0;
851         float2 uv1 : TEXCOORD1;
852         float2 uv2 : TEXCOORD2;
853     };
854 
855     struct SPIRV_Cross_Output
856     {
857         float4 frag_color : SV_Target0;
858     };
859 
860     void frag_main()
861     {
862         frag_color = float4((tex0.Sample(smp, uv0).xyz + tex1.Sample(smp, uv1).xyz) + tex2.Sample(smp, uv2).xyz, 1.0f);
863     }
864 
865     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
866     {
867         uv0 = stage_input.uv0;
868         uv1 = stage_input.uv1;
869         uv2 = stage_input.uv2;
870         frag_main();
871         SPIRV_Cross_Output stage_output;
872         stage_output.frag_color = frag_color;
873         return stage_output;
874     }
875 */
876 __gshared char[818] FS_FSQ_SOURCE_HLSL5 = [
877     0x54,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,
878     0x3e,0x20,0x74,0x65,0x78,0x30,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,
879     0x72,0x28,0x74,0x30,0x29,0x3b,0x0a,0x53,0x61,0x6d,0x70,0x6c,0x65,0x72,0x53,0x74,
880     0x61,0x74,0x65,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,
881     0x65,0x72,0x28,0x73,0x30,0x29,0x3b,0x0a,0x54,0x65,0x78,0x74,0x75,0x72,0x65,0x32,
882     0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,0x3e,0x20,0x74,0x65,0x78,0x31,0x20,0x3a,
883     0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x74,0x31,0x29,0x3b,0x0a,0x54,
884     0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,0x3e,
885     0x20,0x74,0x65,0x78,0x32,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,
886     0x28,0x74,0x32,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,
887     0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x30,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
888     0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x31,0x3b,0x0a,0x73,0x74,0x61,
889     0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x32,0x3b,0x0a,
890     0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,
891     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,
892     0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,
893     0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
894     0x20,0x75,0x76,0x30,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,
895     0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x31,
896     0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,
897     0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x32,0x20,0x3a,0x20,0x54,
898     0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,
899     0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,
900     0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
901     0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
902     0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72,0x67,0x65,0x74,0x30,0x3b,0x0a,0x7d,0x3b,
903     0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,
904     0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
905     0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x74,0x65,
906     0x78,0x30,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x75,
907     0x76,0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2b,0x20,0x74,0x65,0x78,0x31,0x2e,0x53,
908     0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x31,0x29,0x2e,
909     0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,0x74,0x65,0x78,0x32,0x2e,0x53,0x61,0x6d,0x70,
910     0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x32,0x29,0x2e,0x78,0x79,0x7a,
911     0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,
912     0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,
913     0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,
914     0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,
915     0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x30,0x20,0x3d,0x20,0x73,
916     0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x75,0x76,0x30,0x3b,0x0a,
917     0x20,0x20,0x20,0x20,0x75,0x76,0x31,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,
918     0x69,0x6e,0x70,0x75,0x74,0x2e,0x75,0x76,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,
919     0x76,0x32,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,
920     0x2e,0x75,0x76,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,
921     0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,
922     0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,
923     0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,
924     0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,0x72,0x61,
925     0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
926     0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
927     0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,
928     0x0a,0x00,
929 ];
930 /*
931     static float4 gl_Position;
932     static float2 pos;
933     static float2 uv;
934 
935     struct SPIRV_Cross_Input
936     {
937         float2 pos : TEXCOORD0;
938     };
939 
940     struct SPIRV_Cross_Output
941     {
942         float2 uv : TEXCOORD0;
943         float4 gl_Position : SV_Position;
944     };
945 
946     void vert_main()
947     {
948         gl_Position = float4((pos * 2.0f) - 1.0f.xx, 0.5f, 1.0f);
949         uv = pos;
950     }
951 
952     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
953     {
954         pos = stage_input.pos;
955         vert_main();
956         SPIRV_Cross_Output stage_output;
957         stage_output.gl_Position = gl_Position;
958         stage_output.uv = uv;
959         return stage_output;
960     }
961 */
962 __gshared char[555] VS_DBG_SOURCE_HLSL5 = [
963     0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,
964     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,
965     0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x73,0x74,
966     0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x3b,0x0a,
967     0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,
968     0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
969     0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x6f,0x73,0x20,0x3a,0x20,0x54,0x45,0x58,
970     0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,
971     0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,
972     0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
973     0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,
974     0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,
975     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,0x50,
976     0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
977     0x64,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,
978     0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
979     0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x70,0x6f,0x73,0x20,0x2a,0x20,
980     0x32,0x2e,0x30,0x66,0x29,0x20,0x2d,0x20,0x31,0x2e,0x30,0x66,0x2e,0x78,0x78,0x2c,
981     0x20,0x30,0x2e,0x35,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,
982     0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,
983     0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,
984     0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,
985     0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,
986     0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,
987     0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,
988     0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,
989     0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,
990     0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,
991     0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,
992     0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,
993     0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
994     0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,
995     0x75,0x74,0x70,0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,
996     0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,
997     0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
998 ];
999 /*
1000     Texture2D<float4> tex : register(t0);
1001     SamplerState smp : register(s0);
1002 
1003     static float4 frag_color;
1004     static float2 uv;
1005 
1006     struct SPIRV_Cross_Input
1007     {
1008         float2 uv : TEXCOORD0;
1009     };
1010 
1011     struct SPIRV_Cross_Output
1012     {
1013         float4 frag_color : SV_Target0;
1014     };
1015 
1016     void frag_main()
1017     {
1018         frag_color = float4(tex.Sample(smp, uv).xyz, 1.0f);
1019     }
1020 
1021     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
1022     {
1023         uv = stage_input.uv;
1024         frag_main();
1025         SPIRV_Cross_Output stage_output;
1026         stage_output.frag_color = frag_color;
1027         return stage_output;
1028     }
1029 */
1030 __gshared char[527] FS_DBG_SOURCE_HLSL5 = [
1031     0x54,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,
1032     0x3e,0x20,0x74,0x65,0x78,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,
1033     0x28,0x74,0x30,0x29,0x3b,0x0a,0x53,0x61,0x6d,0x70,0x6c,0x65,0x72,0x53,0x74,0x61,
1034     0x74,0x65,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,
1035     0x72,0x28,0x73,0x30,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,
1036     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1037     0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
1038     0x75,0x76,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,
1039     0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,
1040     0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20,
1041     0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,
1042     0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,
1043     0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
1044     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1045     0x20,0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72,0x67,0x65,0x74,0x30,0x3b,0x0a,0x7d,
1046     0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,
1047     0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
1048     0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x74,0x65,
1049     0x78,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,
1050     0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x7d,0x0a,
1051     0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,
1052     0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,
1053     0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,
1054     0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,
1055     0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x75,
1056     0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,
1057     0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,
1058     0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,
1059     0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,
1060     0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,
1061     0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
1062     0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,
1063     0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
1064 ];
1065 /*
1066     #include <metal_stdlib>
1067     #include <simd/simd.h>
1068 
1069     using namespace metal;
1070 
1071     struct offscreen_params
1072     {
1073         float4x4 mvp;
1074     };
1075 
1076     struct main0_out
1077     {
1078         float bright [[user(locn0)]];
1079         float4 gl_Position [[position]];
1080     };
1081 
1082     struct main0_in
1083     {
1084         float4 pos [[attribute(0)]];
1085         float bright0 [[attribute(1)]];
1086     };
1087 
1088     vertex main0_out main0(main0_in in [[stage_in]], constant offscreen_params& _19 [[buffer(0)]])
1089     {
1090         main0_out out = {};
1091         out.gl_Position = _19.mvp * in.pos;
1092         out.bright = in.bright0;
1093         return out;
1094     }
1095 
1096 */
1097 __gshared char[515] VS_OFFSCREEN_SOURCE_METAL_MACOS = [
1098     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
1099     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
1100     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
1101     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
1102     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6f,
1103     0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,
1104     0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,
1105     0x76,0x70,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
1106     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
1107     0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x20,0x5b,0x5b,0x75,0x73,
1108     0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,
1109     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
1110     0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,
1111     0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,
1112     0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
1113     0x74,0x34,0x20,0x70,0x6f,0x73,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,
1114     0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
1115     0x61,0x74,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,
1116     0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,
1117     0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
1118     0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,
1119     0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,
1120     0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x6f,0x66,0x66,0x73,0x63,
1121     0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,
1122     0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,
1123     0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,
1124     0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,
1125     0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
1126     0x5f,0x31,0x39,0x2e,0x6d,0x76,0x70,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,
1127     0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x62,0x72,0x69,0x67,0x68,0x74,
1128     0x20,0x3d,0x20,0x69,0x6e,0x2e,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x3b,0x0a,0x20,
1129     0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,
1130     0x0a,0x0a,0x00,
1131 ];
1132 /*
1133     #include <metal_stdlib>
1134     #include <simd/simd.h>
1135 
1136     using namespace metal;
1137 
1138     struct main0_out
1139     {
1140         float4 frag_color_0 [[color(0)]];
1141         float4 frag_color_1 [[color(1)]];
1142         float4 frag_color_2 [[color(2)]];
1143     };
1144 
1145     struct main0_in
1146     {
1147         float bright [[user(locn0)]];
1148     };
1149 
1150     fragment main0_out main0(main0_in in [[stage_in]])
1151     {
1152         main0_out out = {};
1153         out.frag_color_0 = float4(in.bright, 0.0, 0.0, 1.0);
1154         out.frag_color_1 = float4(0.0, in.bright, 0.0, 1.0);
1155         out.frag_color_2 = float4(0.0, 0.0, in.bright, 1.0);
1156         return out;
1157     }
1158 
1159 */
1160 __gshared char[533] FS_OFFSCREEN_SOURCE_METAL_MACOS = [
1161     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
1162     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
1163     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
1164     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
1165     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
1166     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
1167     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1168     0x5f,0x30,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,
1169     0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,
1170     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,
1171     0x28,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
1172     0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x5b,
1173     0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,
1174     0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,
1175     0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x72,0x69,
1176     0x67,0x68,0x74,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,
1177     0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,
1178     0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
1179     0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,
1180     0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,
1181     0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,
1182     0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,
1183     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,
1184     0x61,0x74,0x34,0x28,0x69,0x6e,0x2e,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x30,
1185     0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
1186     0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
1187     0x72,0x5f,0x31,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,
1188     0x2c,0x20,0x69,0x6e,0x2e,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x30,0x2e,0x30,
1189     0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
1190     0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3d,0x20,0x66,
1191     0x6c,0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
1192     0x69,0x6e,0x2e,0x62,0x72,0x69,0x67,0x68,0x74,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
1193     0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,
1194     0x0a,0x7d,0x0a,0x0a,0x00,
1195 ];
1196 /*
1197     #include <metal_stdlib>
1198     #include <simd/simd.h>
1199 
1200     using namespace metal;
1201 
1202     struct fsq_params
1203     {
1204         float2 offset;
1205     };
1206 
1207     struct main0_out
1208     {
1209         float2 uv0 [[user(locn0)]];
1210         float2 uv1 [[user(locn1)]];
1211         float2 uv2 [[user(locn2)]];
1212         float4 gl_Position [[position]];
1213     };
1214 
1215     struct main0_in
1216     {
1217         float2 pos [[attribute(0)]];
1218     };
1219 
1220     vertex main0_out main0(main0_in in [[stage_in]], constant fsq_params& _36 [[buffer(0)]])
1221     {
1222         main0_out out = {};
1223         out.gl_Position = float4((in.pos * 2.0) - float2(1.0), 0.5, 1.0);
1224         out.uv0 = in.pos + float2(_36.offset.x, 0.0);
1225         out.uv1 = in.pos + float2(0.0, _36.offset.y);
1226         out.uv2 = in.pos;
1227         return out;
1228     }
1229 
1230 */
1231 __gshared char[653] VS_FSQ_SOURCE_METAL_MACOS = [
1232     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
1233     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
1234     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
1235     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
1236     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x66,
1237     0x73,0x71,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
1238     0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x6f,0x66,0x66,0x73,0x65,0x74,0x3b,0x0a,0x7d,
1239     0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
1240     0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
1241     0x20,0x75,0x76,0x30,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
1242     0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
1243     0x20,0x75,0x76,0x31,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
1244     0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
1245     0x20,0x75,0x76,0x32,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
1246     0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
1247     0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,
1248     0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,
1249     0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,
1250     0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x6f,0x73,0x20,
1251     0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,
1252     0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,
1253     0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,
1254     0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,
1255     0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,
1256     0x66,0x73,0x71,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x33,0x36,0x20,
1257     0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,
1258     0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,
1259     0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,
1260     0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,
1261     0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x20,0x2a,0x20,
1262     0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,
1263     0x30,0x29,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
1264     0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x75,0x76,0x30,0x20,0x3d,0x20,0x69,0x6e,0x2e,
1265     0x70,0x6f,0x73,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,0x33,0x36,
1266     0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x2e,0x78,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,
1267     0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x75,0x76,0x31,0x20,0x3d,0x20,0x69,
1268     0x6e,0x2e,0x70,0x6f,0x73,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x30,
1269     0x2e,0x30,0x2c,0x20,0x5f,0x33,0x36,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x2e,0x79,
1270     0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x75,0x76,0x32,0x20,0x3d,
1271     0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
1272     0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1273 ];
1274 /*
1275     #include <metal_stdlib>
1276     #include <simd/simd.h>
1277 
1278     using namespace metal;
1279 
1280     struct main0_out
1281     {
1282         float4 frag_color [[color(0)]];
1283     };
1284 
1285     struct main0_in
1286     {
1287         float2 uv0 [[user(locn0)]];
1288         float2 uv1 [[user(locn1)]];
1289         float2 uv2 [[user(locn2)]];
1290     };
1291 
1292     fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex0 [[texture(0)]], texture2d<float> tex1 [[texture(1)]], texture2d<float> tex2 [[texture(2)]], sampler smp [[sampler(0)]])
1293     {
1294         main0_out out = {};
1295         out.frag_color = float4((tex0.sample(smp, in.uv0).xyz + tex1.sample(smp, in.uv1).xyz) + tex2.sample(smp, in.uv2).xyz, 1.0);
1296         return out;
1297     }
1298 
1299 */
1300 __gshared char[616] FS_FSQ_SOURCE_METAL_MACOS = [
1301     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
1302     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
1303     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
1304     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
1305     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
1306     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
1307     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1308     0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
1309     0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
1310     0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
1311     0x75,0x76,0x30,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,
1312     0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
1313     0x75,0x76,0x31,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,
1314     0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
1315     0x75,0x76,0x32,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x32,
1316     0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,
1317     0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
1318     0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,
1319     0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,
1320     0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65,0x78,
1321     0x30,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,
1322     0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,
1323     0x74,0x3e,0x20,0x74,0x65,0x78,0x31,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,
1324     0x65,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,
1325     0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65,0x78,0x32,0x20,0x5b,0x5b,
1326     0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x32,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,
1327     0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,
1328     0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
1329     0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,
1330     0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,
1331     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,
1332     0x28,0x74,0x65,0x78,0x30,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,
1333     0x2c,0x20,0x69,0x6e,0x2e,0x75,0x76,0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2b,0x20,
1334     0x74,0x65,0x78,0x31,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,
1335     0x20,0x69,0x6e,0x2e,0x75,0x76,0x31,0x29,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2b,0x20,
1336     0x74,0x65,0x78,0x32,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,
1337     0x20,0x69,0x6e,0x2e,0x75,0x76,0x32,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,
1338     0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,
1339     0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1340 ];
1341 /*
1342     #include <metal_stdlib>
1343     #include <simd/simd.h>
1344 
1345     using namespace metal;
1346 
1347     struct main0_out
1348     {
1349         float2 uv [[user(locn0)]];
1350         float4 gl_Position [[position]];
1351     };
1352 
1353     struct main0_in
1354     {
1355         float2 pos [[attribute(0)]];
1356     };
1357 
1358     vertex main0_out main0(main0_in in [[stage_in]])
1359     {
1360         main0_out out = {};
1361         out.gl_Position = float4((in.pos * 2.0) - float2(1.0), 0.5, 1.0);
1362         out.uv = in.pos;
1363         return out;
1364     }
1365 
1366 */
1367 __gshared char[404] VS_DBG_SOURCE_METAL_MACOS = [
1368     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
1369     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
1370     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
1371     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
1372     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
1373     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
1374     0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,
1375     0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
1376     0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
1377     0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,
1378     0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
1379     0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
1380     0x70,0x6f,0x73,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,
1381     0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,
1382     0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,
1383     0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,
1384     0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
1385     0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,
1386     0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,
1387     0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
1388     0x34,0x28,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,
1389     0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,
1390     0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,
1391     0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x3b,0x0a,
1392     0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,
1393     0x7d,0x0a,0x0a,0x00,
1394 ];
1395 /*
1396     #include <metal_stdlib>
1397     #include <simd/simd.h>
1398 
1399     using namespace metal;
1400 
1401     struct main0_out
1402     {
1403         float4 frag_color [[color(0)]];
1404     };
1405 
1406     struct main0_in
1407     {
1408         float2 uv [[user(locn0)]];
1409     };
1410 
1411     fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex [[texture(0)]], sampler smp [[sampler(0)]])
1412     {
1413         main0_out out = {};
1414         out.frag_color = float4(tex.sample(smp, in.uv).xyz, 1.0);
1415         return out;
1416     }
1417 
1418 */
1419 __gshared char[408] FS_DBG_SOURCE_METAL_MACOS = [
1420     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
1421     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
1422     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
1423     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
1424     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
1425     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
1426     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1427     0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
1428     0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
1429     0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
1430     0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,
1431     0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,
1432     0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,
1433     0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,
1434     0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,
1435     0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65,0x78,0x20,
1436     0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,
1437     0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,
1438     0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,
1439     0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,
1440     0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,
1441     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
1442     0x34,0x28,0x74,0x65,0x78,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,
1443     0x2c,0x20,0x69,0x6e,0x2e,0x75,0x76,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,
1444     0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,
1445     0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1446 ];
1447 /*
1448     diagnostic(off, derivative_uniformity);
1449 
1450     struct offscreen_params {
1451       /_ @offset(0) _/
1452       mvp : mat4x4f,
1453     }
1454 
1455     @group(0) @binding(0) var<uniform> x_19 : offscreen_params;
1456 
1457     var<private> pos : vec4f;
1458 
1459     var<private> bright : f32;
1460 
1461     var<private> bright0 : f32;
1462 
1463     var<private> gl_Position : vec4f;
1464 
1465     fn main_1() {
1466       let x_22 : mat4x4f = x_19.mvp;
1467       let x_25 : vec4f = pos;
1468       gl_Position = (x_22 * x_25);
1469       let x_33 : f32 = bright0;
1470       bright = x_33;
1471       return;
1472     }
1473 
1474     struct main_out {
1475       @builtin(position)
1476       gl_Position : vec4f,
1477       @location(0)
1478       bright_1 : f32,
1479     }
1480 
1481     @vertex
1482     fn main(@location(0) pos_param : vec4f, @location(1) bright0_param : f32) -> main_out {
1483       pos = pos_param;
1484       bright0 = bright0_param;
1485       main_1();
1486       return main_out(gl_Position, bright);
1487     }
1488 
1489 */
1490 __gshared char[744] VS_OFFSCREEN_SOURCE_WGSL = [
1491     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1492     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1493     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
1494     0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
1495     0x20,0x7b,0x0a,0x20,0x20,0x2f,0x2a,0x20,0x40,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,
1496     0x30,0x29,0x20,0x2a,0x2f,0x0a,0x20,0x20,0x6d,0x76,0x70,0x20,0x3a,0x20,0x6d,0x61,
1497     0x74,0x34,0x78,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,
1498     0x28,0x30,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x30,0x29,0x20,
1499     0x76,0x61,0x72,0x3c,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x3e,0x20,0x78,0x5f,0x31,
1500     0x39,0x20,0x3a,0x20,0x6f,0x66,0x66,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x70,0x61,
1501     0x72,0x61,0x6d,0x73,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,
1502     0x74,0x65,0x3e,0x20,0x70,0x6f,0x73,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,
1503     0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x62,
1504     0x72,0x69,0x67,0x68,0x74,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x0a,0x76,0x61,
1505     0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x62,0x72,0x69,0x67,0x68,
1506     0x74,0x30,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,
1507     0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
1508     0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,
1509     0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,
1510     0x74,0x20,0x78,0x5f,0x32,0x32,0x20,0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,
1511     0x20,0x3d,0x20,0x78,0x5f,0x31,0x39,0x2e,0x6d,0x76,0x70,0x3b,0x0a,0x20,0x20,0x6c,
1512     0x65,0x74,0x20,0x78,0x5f,0x32,0x35,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,
1513     0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
1514     0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x78,0x5f,0x32,0x32,0x20,0x2a,0x20,0x78,
1515     0x5f,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x33,
1516     0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x30,
1517     0x3b,0x0a,0x20,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x78,0x5f,0x33,
1518     0x33,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,
1519     0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,
1520     0x7b,0x0a,0x20,0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69,0x6e,0x28,0x70,0x6f,0x73,
1521     0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
1522     0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,
1523     0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x62,
1524     0x72,0x69,0x67,0x68,0x74,0x5f,0x31,0x20,0x3a,0x20,0x66,0x33,0x32,0x2c,0x0a,0x7d,
1525     0x0a,0x0a,0x40,0x76,0x65,0x72,0x74,0x65,0x78,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,
1526     0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x70,
1527     0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,
1528     0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,0x62,
1529     0x72,0x69,0x67,0x68,0x74,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x66,
1530     0x33,0x32,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,
1531     0x7b,0x0a,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,
1532     0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x20,0x3d,
1533     0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,
1534     0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,
1535     0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x67,0x6c,
1536     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x62,0x72,0x69,0x67,0x68,
1537     0x74,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1538 ];
1539 /*
1540     diagnostic(off, derivative_uniformity);
1541 
1542     var<private> frag_color_0 : vec4f;
1543 
1544     var<private> bright : f32;
1545 
1546     var<private> frag_color_1 : vec4f;
1547 
1548     var<private> frag_color_2 : vec4f;
1549 
1550     fn main_1() {
1551       let x_12 : f32 = bright;
1552       frag_color_0 = vec4f(x_12, 0.0f, 0.0f, 1.0f);
1553       let x_17 : f32 = bright;
1554       frag_color_1 = vec4f(0.0f, x_17, 0.0f, 1.0f);
1555       let x_20 : f32 = bright;
1556       frag_color_2 = vec4f(0.0f, 0.0f, x_20, 1.0f);
1557       return;
1558     }
1559 
1560     struct main_out {
1561       @location(0)
1562       frag_color_0_1 : vec4f,
1563       @location(1)
1564       frag_color_1_1 : vec4f,
1565       @location(2)
1566       frag_color_2_1 : vec4f,
1567     }
1568 
1569     @fragment
1570     fn main(@location(0) bright_param : f32) -> main_out {
1571       bright = bright_param;
1572       main_1();
1573       return main_out(frag_color_0, frag_color_1, frag_color_2);
1574     }
1575 
1576 */
1577 __gshared char[740] FS_OFFSCREEN_SOURCE_WGSL = [
1578     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1579     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1580     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1581     0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1582     0x5f,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,
1583     0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x62,0x72,0x69,0x67,0x68,0x74,
1584     0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1585     0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1586     0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,
1587     0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
1588     0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,
1589     0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,
1590     0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x32,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,
1591     0x3d,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,
1592     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x66,
1593     0x28,0x78,0x5f,0x31,0x32,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,0x20,0x30,0x2e,0x30,
1594     0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,
1595     0x78,0x5f,0x31,0x37,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x62,0x72,0x69,
1596     0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
1597     0x72,0x5f,0x31,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x30,0x2e,0x30,0x66,
1598     0x2c,0x20,0x78,0x5f,0x31,0x37,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,0x20,0x31,0x2e,
1599     0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x30,0x20,
1600     0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x3b,0x0a,
1601     0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x20,0x3d,
1602     0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x30,0x2e,0x30,0x66,0x2c,0x20,0x30,0x2e,0x30,
1603     0x66,0x2c,0x20,0x78,0x5f,0x32,0x30,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,
1604     0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,
1605     0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,
1606     0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,
1607     0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x30,0x5f,0x31,0x20,0x3a,
1608     0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,
1609     0x69,0x6f,0x6e,0x28,0x31,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
1610     0x6c,0x6f,0x72,0x5f,0x31,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,
1611     0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x0a,
1612     0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x5f,0x31,
1613     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x66,0x72,
1614     0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,
1615     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x62,0x72,0x69,0x67,
1616     0x68,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x66,0x33,0x32,0x29,0x20,
1617     0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,
1618     0x62,0x72,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x62,0x72,0x69,0x67,0x68,0x74,0x5f,
1619     0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,
1620     0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,
1621     0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,
1622     0x30,0x2c,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x2c,
1623     0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x32,0x29,0x3b,0x0a,
1624     0x7d,0x0a,0x0a,0x00,
1625 ];
1626 /*
1627     diagnostic(off, derivative_uniformity);
1628 
1629     struct fsq_params {
1630       /_ @offset(0) _/
1631       offset : vec2f,
1632     }
1633 
1634     var<private> pos : vec2f;
1635 
1636     var<private> uv0 : vec2f;
1637 
1638     @group(0) @binding(0) var<uniform> x_36 : fsq_params;
1639 
1640     var<private> uv1 : vec2f;
1641 
1642     var<private> uv2 : vec2f;
1643 
1644     var<private> gl_Position : vec4f;
1645 
1646     fn main_1() {
1647       let x_19 : vec2f = pos;
1648       let x_24 : vec2f = ((x_19 * 2.0f) - vec2f(1.0f, 1.0f));
1649       gl_Position = vec4f(x_24.x, x_24.y, 0.5f, 1.0f);
1650       let x_33 : vec2f = pos;
1651       let x_40 : f32 = x_36.offset.x;
1652       uv0 = (x_33 + vec2f(x_40, 0.0f));
1653       let x_45 : vec2f = pos;
1654       let x_47 : f32 = x_36.offset.y;
1655       uv1 = (x_45 + vec2f(0.0f, x_47));
1656       let x_51 : vec2f = pos;
1657       uv2 = x_51;
1658       return;
1659     }
1660 
1661     struct main_out {
1662       @builtin(position)
1663       gl_Position : vec4f,
1664       @location(0)
1665       uv0_1 : vec2f,
1666       @location(1)
1667       uv1_1 : vec2f,
1668       @location(2)
1669       uv2_1 : vec2f,
1670     }
1671 
1672     @vertex
1673     fn main(@location(0) pos_param : vec2f) -> main_out {
1674       pos = pos_param;
1675       main_1();
1676       return main_out(gl_Position, uv0, uv1, uv2);
1677     }
1678 
1679 */
1680 __gshared char[998] VS_FSQ_SOURCE_WGSL = [
1681     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1682     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1683     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
1684     0x66,0x73,0x71,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x7b,0x0a,0x20,0x20,0x2f,
1685     0x2a,0x20,0x40,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x30,0x29,0x20,0x2a,0x2f,0x0a,
1686     0x20,0x20,0x6f,0x66,0x66,0x73,0x65,0x74,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,
1687     0x2c,0x0a,0x7d,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,
1688     0x3e,0x20,0x70,0x6f,0x73,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,
1689     0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x30,
1690     0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,
1691     0x70,0x28,0x30,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x30,0x29,
1692     0x20,0x76,0x61,0x72,0x3c,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x3e,0x20,0x78,0x5f,
1693     0x33,0x36,0x20,0x3a,0x20,0x66,0x73,0x71,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x3b,
1694     0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x75,
1695     0x76,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,
1696     0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x32,0x20,0x3a,0x20,
1697     0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,
1698     0x61,0x74,0x65,0x3e,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
1699     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,
1700     0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,
1701     0x5f,0x31,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x70,0x6f,
1702     0x73,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x34,0x20,0x3a,0x20,
1703     0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x28,0x28,0x78,0x5f,0x31,0x39,0x20,0x2a,
1704     0x20,0x32,0x2e,0x30,0x66,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x66,0x28,0x31,
1705     0x2e,0x30,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x29,0x3b,0x0a,0x20,0x20,0x67,
1706     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,
1707     0x34,0x66,0x28,0x78,0x5f,0x32,0x34,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x32,0x34,0x2e,
1708     0x79,0x2c,0x20,0x30,0x2e,0x35,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,
1709     0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x33,0x20,0x3a,0x20,0x76,0x65,0x63,
1710     0x32,0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,
1711     0x78,0x5f,0x34,0x30,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,
1712     0x36,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x75,0x76,
1713     0x30,0x20,0x3d,0x20,0x28,0x78,0x5f,0x33,0x33,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,
1714     0x66,0x28,0x78,0x5f,0x34,0x30,0x2c,0x20,0x30,0x2e,0x30,0x66,0x29,0x29,0x3b,0x0a,
1715     0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x35,0x20,0x3a,0x20,0x76,0x65,0x63,
1716     0x32,0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,
1717     0x78,0x5f,0x34,0x37,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,
1718     0x36,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x75,0x76,
1719     0x31,0x20,0x3d,0x20,0x28,0x78,0x5f,0x34,0x35,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,
1720     0x66,0x28,0x30,0x2e,0x30,0x66,0x2c,0x20,0x78,0x5f,0x34,0x37,0x29,0x29,0x3b,0x0a,
1721     0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,
1722     0x32,0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x75,0x76,0x32,0x20,
1723     0x3d,0x20,0x78,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
1724     0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,
1725     0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69,
1726     0x6e,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c,
1727     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,
1728     0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,
1729     0x29,0x0a,0x20,0x20,0x75,0x76,0x30,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,
1730     0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,
1731     0x29,0x0a,0x20,0x20,0x75,0x76,0x31,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,
1732     0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,
1733     0x29,0x0a,0x20,0x20,0x75,0x76,0x32,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,
1734     0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x76,0x65,0x72,0x74,0x65,0x78,0x0a,0x66,0x6e,
1735     0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,
1736     0x30,0x29,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,
1737     0x65,0x63,0x32,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,
1738     0x74,0x20,0x7b,0x0a,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x70,0x6f,0x73,0x5f,
1739     0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,
1740     0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,
1741     0x5f,0x6f,0x75,0x74,0x28,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
1742     0x2c,0x20,0x75,0x76,0x30,0x2c,0x20,0x75,0x76,0x31,0x2c,0x20,0x75,0x76,0x32,0x29,
1743     0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1744 ];
1745 /*
1746     diagnostic(off, derivative_uniformity);
1747 
1748     @group(1) @binding(64) var tex0 : texture_2d<f32>;
1749 
1750     @group(1) @binding(80) var smp : sampler;
1751 
1752     var<private> uv0 : vec2f;
1753 
1754     @group(1) @binding(65) var tex1 : texture_2d<f32>;
1755 
1756     var<private> uv1 : vec2f;
1757 
1758     @group(1) @binding(66) var tex2 : texture_2d<f32>;
1759 
1760     var<private> uv2 : vec2f;
1761 
1762     var<private> frag_color : vec4f;
1763 
1764     fn main_1() {
1765       var c0 : vec3f;
1766       var c1 : vec3f;
1767       var c2 : vec3f;
1768       let x_23 : vec2f = uv0;
1769       let x_25 : vec4f = textureSample(tex0, smp, x_23);
1770       c0 = vec3f(x_25.x, x_25.y, x_25.z);
1771       let x_33 : vec2f = uv1;
1772       let x_34 : vec4f = textureSample(tex1, smp, x_33);
1773       c1 = vec3f(x_34.x, x_34.y, x_34.z);
1774       let x_42 : vec2f = uv2;
1775       let x_43 : vec4f = textureSample(tex2, smp, x_42);
1776       c2 = vec3f(x_43.x, x_43.y, x_43.z);
1777       let x_47 : vec3f = c0;
1778       let x_48 : vec3f = c1;
1779       let x_50 : vec3f = c2;
1780       let x_51 : vec3f = ((x_47 + x_48) + x_50);
1781       frag_color = vec4f(x_51.x, x_51.y, x_51.z, 1.0f);
1782       return;
1783     }
1784 
1785     struct main_out {
1786       @location(0)
1787       frag_color_1 : vec4f,
1788     }
1789 
1790     @fragment
1791     fn main(@location(0) uv0_param : vec2f, @location(1) uv1_param : vec2f, @location(2) uv2_param : vec2f) -> main_out {
1792       uv0 = uv0_param;
1793       uv1 = uv1_param;
1794       uv2 = uv2_param;
1795       main_1();
1796       return main_out(frag_color);
1797     }
1798 
1799 */
1800 __gshared char[1251] FS_FSQ_SOURCE_WGSL = [
1801     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1802     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1803     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,
1804     0x31,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x36,0x34,0x29,0x20,
1805     0x76,0x61,0x72,0x20,0x74,0x65,0x78,0x30,0x20,0x3a,0x20,0x74,0x65,0x78,0x74,0x75,
1806     0x72,0x65,0x5f,0x32,0x64,0x3c,0x66,0x33,0x32,0x3e,0x3b,0x0a,0x0a,0x40,0x67,0x72,
1807     0x6f,0x75,0x70,0x28,0x31,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,
1808     0x38,0x30,0x29,0x20,0x76,0x61,0x72,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x73,0x61,
1809     0x6d,0x70,0x6c,0x65,0x72,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,
1810     0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,
1811     0x3b,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x31,0x29,0x20,0x40,0x62,0x69,
1812     0x6e,0x64,0x69,0x6e,0x67,0x28,0x36,0x35,0x29,0x20,0x76,0x61,0x72,0x20,0x74,0x65,
1813     0x78,0x31,0x20,0x3a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x32,0x64,0x3c,
1814     0x66,0x33,0x32,0x3e,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,
1815     0x74,0x65,0x3e,0x20,0x75,0x76,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,
1816     0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x31,0x29,0x20,0x40,0x62,0x69,0x6e,
1817     0x64,0x69,0x6e,0x67,0x28,0x36,0x36,0x29,0x20,0x76,0x61,0x72,0x20,0x74,0x65,0x78,
1818     0x32,0x20,0x3a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x32,0x64,0x3c,0x66,
1819     0x33,0x32,0x3e,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,
1820     0x65,0x3e,0x20,0x75,0x76,0x32,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,
1821     0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,
1822     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,
1823     0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,
1824     0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x63,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,
1825     0x66,0x3b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x63,0x31,0x20,0x3a,0x20,0x76,0x65,
1826     0x63,0x33,0x66,0x3b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x63,0x32,0x20,0x3a,0x20,
1827     0x76,0x65,0x63,0x33,0x66,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,
1828     0x33,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x30,0x3b,
1829     0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x35,0x20,0x3a,0x20,0x76,0x65,
1830     0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,
1831     0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x30,0x2c,0x20,0x73,0x6d,0x70,0x2c,0x20,0x78,
1832     0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20,0x20,0x63,0x30,0x20,0x3d,0x20,0x76,0x65,0x63,
1833     0x33,0x66,0x28,0x78,0x5f,0x32,0x35,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x32,0x35,0x2e,
1834     0x79,0x2c,0x20,0x78,0x5f,0x32,0x35,0x2e,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,
1835     0x74,0x20,0x78,0x5f,0x33,0x33,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,
1836     0x20,0x75,0x76,0x31,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x34,
1837     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,
1838     0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x31,0x2c,0x20,0x73,
1839     0x6d,0x70,0x2c,0x20,0x78,0x5f,0x33,0x33,0x29,0x3b,0x0a,0x20,0x20,0x63,0x31,0x20,
1840     0x3d,0x20,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x33,0x34,0x2e,0x78,0x2c,0x20,
1841     0x78,0x5f,0x33,0x34,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x33,0x34,0x2e,0x7a,0x29,0x3b,
1842     0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x32,0x20,0x3a,0x20,0x76,0x65,
1843     0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x32,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,
1844     0x20,0x78,0x5f,0x34,0x33,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,
1845     0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,
1846     0x78,0x32,0x2c,0x20,0x73,0x6d,0x70,0x2c,0x20,0x78,0x5f,0x34,0x32,0x29,0x3b,0x0a,
1847     0x20,0x20,0x63,0x32,0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x34,
1848     0x33,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x34,0x33,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x34,
1849     0x33,0x2e,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x37,
1850     0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x63,0x30,0x3b,0x0a,0x20,
1851     0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x38,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,
1852     0x66,0x20,0x3d,0x20,0x63,0x31,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,
1853     0x35,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x63,0x32,0x3b,
1854     0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x31,0x20,0x3a,0x20,0x76,0x65,
1855     0x63,0x33,0x66,0x20,0x3d,0x20,0x28,0x28,0x78,0x5f,0x34,0x37,0x20,0x2b,0x20,0x78,
1856     0x5f,0x34,0x38,0x29,0x20,0x2b,0x20,0x78,0x5f,0x35,0x30,0x29,0x3b,0x0a,0x20,0x20,
1857     0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,
1858     0x34,0x66,0x28,0x78,0x5f,0x35,0x31,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x35,0x31,0x2e,
1859     0x79,0x2c,0x20,0x78,0x5f,0x35,0x31,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,
1860     0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,
1861     0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,
1862     0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,
1863     0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,
1864     0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x66,0x72,0x61,0x67,
1865     0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,
1866     0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x75,0x76,0x30,0x5f,0x70,0x61,
1867     0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,
1868     0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,0x75,0x76,0x31,0x5f,0x70,0x61,
1869     0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,
1870     0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x75,0x76,0x32,0x5f,0x70,0x61,
1871     0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x29,0x20,0x2d,0x3e,0x20,
1872     0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x75,0x76,0x30,
1873     0x20,0x3d,0x20,0x75,0x76,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,
1874     0x75,0x76,0x31,0x20,0x3d,0x20,0x75,0x76,0x31,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,
1875     0x0a,0x20,0x20,0x75,0x76,0x32,0x20,0x3d,0x20,0x75,0x76,0x32,0x5f,0x70,0x61,0x72,
1876     0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,
1877     0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,
1878     0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,
1879     0x0a,0x0a,0x00,
1880 ];
1881 /*
1882     diagnostic(off, derivative_uniformity);
1883 
1884     var<private> pos : vec2f;
1885 
1886     var<private> uv : vec2f;
1887 
1888     var<private> gl_Position : vec4f;
1889 
1890     fn main_1() {
1891       let x_19 : vec2f = pos;
1892       let x_24 : vec2f = ((x_19 * 2.0f) - vec2f(1.0f, 1.0f));
1893       gl_Position = vec4f(x_24.x, x_24.y, 0.5f, 1.0f);
1894       let x_33 : vec2f = pos;
1895       uv = x_33;
1896       return;
1897     }
1898 
1899     struct main_out {
1900       @builtin(position)
1901       gl_Position : vec4f,
1902       @location(0)
1903       uv_1 : vec2f,
1904     }
1905 
1906     @vertex
1907     fn main(@location(0) pos_param : vec2f) -> main_out {
1908       pos = pos_param;
1909       main_1();
1910       return main_out(gl_Position, uv);
1911     }
1912 
1913 */
1914 __gshared char[559] VS_DBG_SOURCE_WGSL = [
1915     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1916     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1917     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1918     0x76,0x61,0x74,0x65,0x3e,0x20,0x70,0x6f,0x73,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,
1919     0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,
1920     0x20,0x75,0x76,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,
1921     0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x67,0x6c,0x5f,0x50,0x6f,
1922     0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,
1923     0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,
1924     0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,
1925     0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,
1926     0x5f,0x32,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x28,0x28,
1927     0x78,0x5f,0x31,0x39,0x20,0x2a,0x20,0x32,0x2e,0x30,0x66,0x29,0x20,0x2d,0x20,0x76,
1928     0x65,0x63,0x32,0x66,0x28,0x31,0x2e,0x30,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,
1929     0x29,0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
1930     0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x78,0x5f,0x32,0x34,0x2e,0x78,0x2c,
1931     0x20,0x78,0x5f,0x32,0x34,0x2e,0x79,0x2c,0x20,0x30,0x2e,0x35,0x66,0x2c,0x20,0x31,
1932     0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x33,
1933     0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,
1934     0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x78,0x5f,0x33,0x33,0x3b,0x0a,0x20,0x20,0x72,
1935     0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
1936     0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x62,
1937     0x75,0x69,0x6c,0x74,0x69,0x6e,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,
1938     0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,
1939     0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,
1940     0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x75,0x76,0x5f,0x31,0x20,0x3a,0x20,
1941     0x76,0x65,0x63,0x32,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x76,0x65,0x72,0x74,0x65,
1942     0x78,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,
1943     0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
1944     0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,
1945     0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,
1946     0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,
1947     0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
1948     0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
1949     0x74,0x69,0x6f,0x6e,0x2c,0x20,0x75,0x76,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1950 ];
1951 /*
1952     diagnostic(off, derivative_uniformity);
1953 
1954     var<private> frag_color : vec4f;
1955 
1956     @group(1) @binding(64) var tex : texture_2d<f32>;
1957 
1958     @group(1) @binding(80) var smp : sampler;
1959 
1960     var<private> uv : vec2f;
1961 
1962     fn main_1() {
1963       let x_23 : vec2f = uv;
1964       let x_24 : vec4f = textureSample(tex, smp, x_23);
1965       let x_26 : vec3f = vec3f(x_24.x, x_24.y, x_24.z);
1966       frag_color = vec4f(x_26.x, x_26.y, x_26.z, 1.0f);
1967       return;
1968     }
1969 
1970     struct main_out {
1971       @location(0)
1972       frag_color_1 : vec4f,
1973     }
1974 
1975     @fragment
1976     fn main(@location(0) uv_param : vec2f) -> main_out {
1977       uv = uv_param;
1978       main_1();
1979       return main_out(frag_color);
1980     }
1981 
1982 */
1983 __gshared char[590] FS_DBG_SOURCE_WGSL = [
1984     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1985     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1986     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1987     0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1988     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,
1989     0x70,0x28,0x31,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x36,0x34,
1990     0x29,0x20,0x76,0x61,0x72,0x20,0x74,0x65,0x78,0x20,0x3a,0x20,0x74,0x65,0x78,0x74,
1991     0x75,0x72,0x65,0x5f,0x32,0x64,0x3c,0x66,0x33,0x32,0x3e,0x3b,0x0a,0x0a,0x40,0x67,
1992     0x72,0x6f,0x75,0x70,0x28,0x31,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,
1993     0x28,0x38,0x30,0x29,0x20,0x76,0x61,0x72,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x73,
1994     0x61,0x6d,0x70,0x6c,0x65,0x72,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1995     0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,
1996     0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,
1997     0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3a,0x20,0x76,0x65,
1998     0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,
1999     0x78,0x5f,0x32,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,
2000     0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,
2001     0x2c,0x20,0x73,0x6d,0x70,0x2c,0x20,0x78,0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20,0x20,
2002     0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x36,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,
2003     0x20,0x3d,0x20,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x32,0x34,0x2e,0x78,0x2c,
2004     0x20,0x78,0x5f,0x32,0x34,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x32,0x34,0x2e,0x7a,0x29,
2005     0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
2006     0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x78,0x5f,0x32,0x36,0x2e,0x78,0x2c,0x20,0x78,
2007     0x5f,0x32,0x36,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x32,0x36,0x2e,0x7a,0x2c,0x20,0x31,
2008     0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,
2009     0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,
2010     0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
2011     0x28,0x30,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
2012     0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,
2013     0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,
2014     0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x75,0x76,
2015     0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x29,0x20,
2016     0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,
2017     0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,
2018     0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,
2019     0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,
2020     0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
2021 ];
2022 sg.ShaderDesc dbgShaderDesc(sg.Backend backend) @trusted @nogc nothrow {
2023     sg.ShaderDesc desc;
2024     desc.label = "dbg_shader";
2025     switch (backend) {
2026         case sg.Backend.Glcore:
2027             desc.vertex_func.source = &VS_DBG_SOURCE_GLSL410[0];
2028             desc.vertex_func.entry = "main";
2029             desc.fragment_func.source = &FS_DBG_SOURCE_GLSL410[0];
2030             desc.fragment_func.entry = "main";
2031             desc.attrs[0].glsl_name = "pos";
2032             desc.images[0].stage = sg.ShaderStage.Fragment;
2033             desc.images[0].multisampled = false;
2034             desc.images[0].image_type = sg.ImageType._2d;
2035             desc.images[0].sample_type = sg.ImageSampleType.Float;
2036             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2037             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2038             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2039             desc.image_sampler_pairs[0].image_slot = 0;
2040             desc.image_sampler_pairs[0].sampler_slot = 0;
2041             desc.image_sampler_pairs[0].glsl_name = "tex_smp";
2042             break;
2043         case sg.Backend.Gles3:
2044             desc.vertex_func.source = &VS_DBG_SOURCE_GLSL300ES[0];
2045             desc.vertex_func.entry = "main";
2046             desc.fragment_func.source = &FS_DBG_SOURCE_GLSL300ES[0];
2047             desc.fragment_func.entry = "main";
2048             desc.attrs[0].glsl_name = "pos";
2049             desc.images[0].stage = sg.ShaderStage.Fragment;
2050             desc.images[0].multisampled = false;
2051             desc.images[0].image_type = sg.ImageType._2d;
2052             desc.images[0].sample_type = sg.ImageSampleType.Float;
2053             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2054             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2055             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2056             desc.image_sampler_pairs[0].image_slot = 0;
2057             desc.image_sampler_pairs[0].sampler_slot = 0;
2058             desc.image_sampler_pairs[0].glsl_name = "tex_smp";
2059             break;
2060         case sg.Backend.D3d11:
2061             desc.vertex_func.source = &VS_DBG_SOURCE_HLSL5[0];
2062             desc.vertex_func.d3d11_target = "vs_5_0";
2063             desc.vertex_func.entry = "main";
2064             desc.fragment_func.source = &FS_DBG_SOURCE_HLSL5[0];
2065             desc.fragment_func.d3d11_target = "ps_5_0";
2066             desc.fragment_func.entry = "main";
2067             desc.attrs[0].hlsl_sem_name = "TEXCOORD";
2068             desc.attrs[0].hlsl_sem_index = 0;
2069             desc.images[0].stage = sg.ShaderStage.Fragment;
2070             desc.images[0].multisampled = false;
2071             desc.images[0].image_type = sg.ImageType._2d;
2072             desc.images[0].sample_type = sg.ImageSampleType.Float;
2073             desc.images[0].hlsl_register_t_n = 0;
2074             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2075             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2076             desc.samplers[0].hlsl_register_s_n = 0;
2077             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2078             desc.image_sampler_pairs[0].image_slot = 0;
2079             desc.image_sampler_pairs[0].sampler_slot = 0;
2080             break;
2081         case sg.Backend.Metal_macos:
2082             desc.vertex_func.source = &VS_DBG_SOURCE_METAL_MACOS[0];
2083             desc.vertex_func.entry = "main0";
2084             desc.fragment_func.source = &FS_DBG_SOURCE_METAL_MACOS[0];
2085             desc.fragment_func.entry = "main0";
2086             desc.images[0].stage = sg.ShaderStage.Fragment;
2087             desc.images[0].multisampled = false;
2088             desc.images[0].image_type = sg.ImageType._2d;
2089             desc.images[0].sample_type = sg.ImageSampleType.Float;
2090             desc.images[0].msl_texture_n = 0;
2091             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2092             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2093             desc.samplers[0].msl_sampler_n = 0;
2094             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2095             desc.image_sampler_pairs[0].image_slot = 0;
2096             desc.image_sampler_pairs[0].sampler_slot = 0;
2097             break;
2098         case sg.Backend.Wgpu:
2099             desc.vertex_func.source = &VS_DBG_SOURCE_WGSL[0];
2100             desc.vertex_func.entry = "main";
2101             desc.fragment_func.source = &FS_DBG_SOURCE_WGSL[0];
2102             desc.fragment_func.entry = "main";
2103             desc.images[0].stage = sg.ShaderStage.Fragment;
2104             desc.images[0].multisampled = false;
2105             desc.images[0].image_type = sg.ImageType._2d;
2106             desc.images[0].sample_type = sg.ImageSampleType.Float;
2107             desc.images[0].wgsl_group1_binding_n = 64;
2108             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2109             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2110             desc.samplers[0].wgsl_group1_binding_n = 80;
2111             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2112             desc.image_sampler_pairs[0].image_slot = 0;
2113             desc.image_sampler_pairs[0].sampler_slot = 0;
2114             break;
2115         default: break;
2116     }
2117     return desc;
2118 }
2119 sg.ShaderDesc fsqShaderDesc(sg.Backend backend) @trusted @nogc nothrow {
2120     sg.ShaderDesc desc;
2121     desc.label = "fsq_shader";
2122     switch (backend) {
2123         case sg.Backend.Glcore:
2124             desc.vertex_func.source = &VS_FSQ_SOURCE_GLSL410[0];
2125             desc.vertex_func.entry = "main";
2126             desc.fragment_func.source = &FS_FSQ_SOURCE_GLSL410[0];
2127             desc.fragment_func.entry = "main";
2128             desc.attrs[0].glsl_name = "pos";
2129             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2130             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2131             desc.uniform_blocks[0].size = 16;
2132             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
2133             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 1;
2134             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "fsq_params";
2135             desc.images[0].stage = sg.ShaderStage.Fragment;
2136             desc.images[0].multisampled = false;
2137             desc.images[0].image_type = sg.ImageType._2d;
2138             desc.images[0].sample_type = sg.ImageSampleType.Float;
2139             desc.images[1].stage = sg.ShaderStage.Fragment;
2140             desc.images[1].multisampled = false;
2141             desc.images[1].image_type = sg.ImageType._2d;
2142             desc.images[1].sample_type = sg.ImageSampleType.Float;
2143             desc.images[2].stage = sg.ShaderStage.Fragment;
2144             desc.images[2].multisampled = false;
2145             desc.images[2].image_type = sg.ImageType._2d;
2146             desc.images[2].sample_type = sg.ImageSampleType.Float;
2147             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2148             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2149             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2150             desc.image_sampler_pairs[0].image_slot = 0;
2151             desc.image_sampler_pairs[0].sampler_slot = 0;
2152             desc.image_sampler_pairs[0].glsl_name = "tex0_smp";
2153             desc.image_sampler_pairs[1].stage = sg.ShaderStage.Fragment;
2154             desc.image_sampler_pairs[1].image_slot = 1;
2155             desc.image_sampler_pairs[1].sampler_slot = 0;
2156             desc.image_sampler_pairs[1].glsl_name = "tex1_smp";
2157             desc.image_sampler_pairs[2].stage = sg.ShaderStage.Fragment;
2158             desc.image_sampler_pairs[2].image_slot = 2;
2159             desc.image_sampler_pairs[2].sampler_slot = 0;
2160             desc.image_sampler_pairs[2].glsl_name = "tex2_smp";
2161             break;
2162         case sg.Backend.Gles3:
2163             desc.vertex_func.source = &VS_FSQ_SOURCE_GLSL300ES[0];
2164             desc.vertex_func.entry = "main";
2165             desc.fragment_func.source = &FS_FSQ_SOURCE_GLSL300ES[0];
2166             desc.fragment_func.entry = "main";
2167             desc.attrs[0].glsl_name = "pos";
2168             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2169             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2170             desc.uniform_blocks[0].size = 16;
2171             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
2172             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 1;
2173             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "fsq_params";
2174             desc.images[0].stage = sg.ShaderStage.Fragment;
2175             desc.images[0].multisampled = false;
2176             desc.images[0].image_type = sg.ImageType._2d;
2177             desc.images[0].sample_type = sg.ImageSampleType.Float;
2178             desc.images[1].stage = sg.ShaderStage.Fragment;
2179             desc.images[1].multisampled = false;
2180             desc.images[1].image_type = sg.ImageType._2d;
2181             desc.images[1].sample_type = sg.ImageSampleType.Float;
2182             desc.images[2].stage = sg.ShaderStage.Fragment;
2183             desc.images[2].multisampled = false;
2184             desc.images[2].image_type = sg.ImageType._2d;
2185             desc.images[2].sample_type = sg.ImageSampleType.Float;
2186             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2187             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2188             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2189             desc.image_sampler_pairs[0].image_slot = 0;
2190             desc.image_sampler_pairs[0].sampler_slot = 0;
2191             desc.image_sampler_pairs[0].glsl_name = "tex0_smp";
2192             desc.image_sampler_pairs[1].stage = sg.ShaderStage.Fragment;
2193             desc.image_sampler_pairs[1].image_slot = 1;
2194             desc.image_sampler_pairs[1].sampler_slot = 0;
2195             desc.image_sampler_pairs[1].glsl_name = "tex1_smp";
2196             desc.image_sampler_pairs[2].stage = sg.ShaderStage.Fragment;
2197             desc.image_sampler_pairs[2].image_slot = 2;
2198             desc.image_sampler_pairs[2].sampler_slot = 0;
2199             desc.image_sampler_pairs[2].glsl_name = "tex2_smp";
2200             break;
2201         case sg.Backend.D3d11:
2202             desc.vertex_func.source = &VS_FSQ_SOURCE_HLSL5[0];
2203             desc.vertex_func.d3d11_target = "vs_5_0";
2204             desc.vertex_func.entry = "main";
2205             desc.fragment_func.source = &FS_FSQ_SOURCE_HLSL5[0];
2206             desc.fragment_func.d3d11_target = "ps_5_0";
2207             desc.fragment_func.entry = "main";
2208             desc.attrs[0].hlsl_sem_name = "TEXCOORD";
2209             desc.attrs[0].hlsl_sem_index = 0;
2210             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2211             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2212             desc.uniform_blocks[0].size = 16;
2213             desc.uniform_blocks[0].hlsl_register_b_n = 0;
2214             desc.images[0].stage = sg.ShaderStage.Fragment;
2215             desc.images[0].multisampled = false;
2216             desc.images[0].image_type = sg.ImageType._2d;
2217             desc.images[0].sample_type = sg.ImageSampleType.Float;
2218             desc.images[0].hlsl_register_t_n = 0;
2219             desc.images[1].stage = sg.ShaderStage.Fragment;
2220             desc.images[1].multisampled = false;
2221             desc.images[1].image_type = sg.ImageType._2d;
2222             desc.images[1].sample_type = sg.ImageSampleType.Float;
2223             desc.images[1].hlsl_register_t_n = 1;
2224             desc.images[2].stage = sg.ShaderStage.Fragment;
2225             desc.images[2].multisampled = false;
2226             desc.images[2].image_type = sg.ImageType._2d;
2227             desc.images[2].sample_type = sg.ImageSampleType.Float;
2228             desc.images[2].hlsl_register_t_n = 2;
2229             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2230             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2231             desc.samplers[0].hlsl_register_s_n = 0;
2232             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2233             desc.image_sampler_pairs[0].image_slot = 0;
2234             desc.image_sampler_pairs[0].sampler_slot = 0;
2235             desc.image_sampler_pairs[1].stage = sg.ShaderStage.Fragment;
2236             desc.image_sampler_pairs[1].image_slot = 1;
2237             desc.image_sampler_pairs[1].sampler_slot = 0;
2238             desc.image_sampler_pairs[2].stage = sg.ShaderStage.Fragment;
2239             desc.image_sampler_pairs[2].image_slot = 2;
2240             desc.image_sampler_pairs[2].sampler_slot = 0;
2241             break;
2242         case sg.Backend.Metal_macos:
2243             desc.vertex_func.source = &VS_FSQ_SOURCE_METAL_MACOS[0];
2244             desc.vertex_func.entry = "main0";
2245             desc.fragment_func.source = &FS_FSQ_SOURCE_METAL_MACOS[0];
2246             desc.fragment_func.entry = "main0";
2247             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2248             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2249             desc.uniform_blocks[0].size = 16;
2250             desc.uniform_blocks[0].msl_buffer_n = 0;
2251             desc.images[0].stage = sg.ShaderStage.Fragment;
2252             desc.images[0].multisampled = false;
2253             desc.images[0].image_type = sg.ImageType._2d;
2254             desc.images[0].sample_type = sg.ImageSampleType.Float;
2255             desc.images[0].msl_texture_n = 0;
2256             desc.images[1].stage = sg.ShaderStage.Fragment;
2257             desc.images[1].multisampled = false;
2258             desc.images[1].image_type = sg.ImageType._2d;
2259             desc.images[1].sample_type = sg.ImageSampleType.Float;
2260             desc.images[1].msl_texture_n = 1;
2261             desc.images[2].stage = sg.ShaderStage.Fragment;
2262             desc.images[2].multisampled = false;
2263             desc.images[2].image_type = sg.ImageType._2d;
2264             desc.images[2].sample_type = sg.ImageSampleType.Float;
2265             desc.images[2].msl_texture_n = 2;
2266             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2267             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2268             desc.samplers[0].msl_sampler_n = 0;
2269             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2270             desc.image_sampler_pairs[0].image_slot = 0;
2271             desc.image_sampler_pairs[0].sampler_slot = 0;
2272             desc.image_sampler_pairs[1].stage = sg.ShaderStage.Fragment;
2273             desc.image_sampler_pairs[1].image_slot = 1;
2274             desc.image_sampler_pairs[1].sampler_slot = 0;
2275             desc.image_sampler_pairs[2].stage = sg.ShaderStage.Fragment;
2276             desc.image_sampler_pairs[2].image_slot = 2;
2277             desc.image_sampler_pairs[2].sampler_slot = 0;
2278             break;
2279         case sg.Backend.Wgpu:
2280             desc.vertex_func.source = &VS_FSQ_SOURCE_WGSL[0];
2281             desc.vertex_func.entry = "main";
2282             desc.fragment_func.source = &FS_FSQ_SOURCE_WGSL[0];
2283             desc.fragment_func.entry = "main";
2284             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2285             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2286             desc.uniform_blocks[0].size = 16;
2287             desc.uniform_blocks[0].wgsl_group0_binding_n = 0;
2288             desc.images[0].stage = sg.ShaderStage.Fragment;
2289             desc.images[0].multisampled = false;
2290             desc.images[0].image_type = sg.ImageType._2d;
2291             desc.images[0].sample_type = sg.ImageSampleType.Float;
2292             desc.images[0].wgsl_group1_binding_n = 64;
2293             desc.images[1].stage = sg.ShaderStage.Fragment;
2294             desc.images[1].multisampled = false;
2295             desc.images[1].image_type = sg.ImageType._2d;
2296             desc.images[1].sample_type = sg.ImageSampleType.Float;
2297             desc.images[1].wgsl_group1_binding_n = 65;
2298             desc.images[2].stage = sg.ShaderStage.Fragment;
2299             desc.images[2].multisampled = false;
2300             desc.images[2].image_type = sg.ImageType._2d;
2301             desc.images[2].sample_type = sg.ImageSampleType.Float;
2302             desc.images[2].wgsl_group1_binding_n = 66;
2303             desc.samplers[0].stage = sg.ShaderStage.Fragment;
2304             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
2305             desc.samplers[0].wgsl_group1_binding_n = 80;
2306             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
2307             desc.image_sampler_pairs[0].image_slot = 0;
2308             desc.image_sampler_pairs[0].sampler_slot = 0;
2309             desc.image_sampler_pairs[1].stage = sg.ShaderStage.Fragment;
2310             desc.image_sampler_pairs[1].image_slot = 1;
2311             desc.image_sampler_pairs[1].sampler_slot = 0;
2312             desc.image_sampler_pairs[2].stage = sg.ShaderStage.Fragment;
2313             desc.image_sampler_pairs[2].image_slot = 2;
2314             desc.image_sampler_pairs[2].sampler_slot = 0;
2315             break;
2316         default: break;
2317     }
2318     return desc;
2319 }
2320 sg.ShaderDesc offscreenShaderDesc(sg.Backend backend) @trusted @nogc nothrow {
2321     sg.ShaderDesc desc;
2322     desc.label = "offscreen_shader";
2323     switch (backend) {
2324         case sg.Backend.Glcore:
2325             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_GLSL410[0];
2326             desc.vertex_func.entry = "main";
2327             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_GLSL410[0];
2328             desc.fragment_func.entry = "main";
2329             desc.attrs[0].glsl_name = "pos";
2330             desc.attrs[1].glsl_name = "bright0";
2331             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2332             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2333             desc.uniform_blocks[0].size = 64;
2334             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
2335             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
2336             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "offscreen_params";
2337             break;
2338         case sg.Backend.Gles3:
2339             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_GLSL300ES[0];
2340             desc.vertex_func.entry = "main";
2341             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_GLSL300ES[0];
2342             desc.fragment_func.entry = "main";
2343             desc.attrs[0].glsl_name = "pos";
2344             desc.attrs[1].glsl_name = "bright0";
2345             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2346             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2347             desc.uniform_blocks[0].size = 64;
2348             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
2349             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
2350             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "offscreen_params";
2351             break;
2352         case sg.Backend.D3d11:
2353             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_HLSL5[0];
2354             desc.vertex_func.d3d11_target = "vs_5_0";
2355             desc.vertex_func.entry = "main";
2356             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_HLSL5[0];
2357             desc.fragment_func.d3d11_target = "ps_5_0";
2358             desc.fragment_func.entry = "main";
2359             desc.attrs[0].hlsl_sem_name = "TEXCOORD";
2360             desc.attrs[0].hlsl_sem_index = 0;
2361             desc.attrs[1].hlsl_sem_name = "TEXCOORD";
2362             desc.attrs[1].hlsl_sem_index = 1;
2363             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2364             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2365             desc.uniform_blocks[0].size = 64;
2366             desc.uniform_blocks[0].hlsl_register_b_n = 0;
2367             break;
2368         case sg.Backend.Metal_macos:
2369             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_METAL_MACOS[0];
2370             desc.vertex_func.entry = "main0";
2371             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_METAL_MACOS[0];
2372             desc.fragment_func.entry = "main0";
2373             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2374             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2375             desc.uniform_blocks[0].size = 64;
2376             desc.uniform_blocks[0].msl_buffer_n = 0;
2377             break;
2378         case sg.Backend.Wgpu:
2379             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_WGSL[0];
2380             desc.vertex_func.entry = "main";
2381             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_WGSL[0];
2382             desc.fragment_func.entry = "main";
2383             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
2384             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
2385             desc.uniform_blocks[0].size = 64;
2386             desc.uniform_blocks[0].wgsl_group0_binding_n = 0;
2387             break;
2388         default: break;
2389     }
2390     return desc;
2391 }