1 module shaders.offscreen;
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/offscreen.glsl -o src/examples/shaders/offscreen.d -l glsl410:metal_macos:hlsl5:glsl300es:wgsl -f sokol_d
13 
14     Overview:
15     =========
16     Shader program: 'default':
17         Get shader desc: defaultShaderDesc(sg.queryBackend());
18         Vertex Shader: vs_default
19         Fragment Shader: fs_default
20         Attributes:
21             ATTR_DEFAULT_POSITION => 0
22             ATTR_DEFAULT_NORMAL => 1
23             ATTR_DEFAULT_TEXCOORD0 => 2
24     Shader program: 'offscreen':
25         Get shader desc: offscreenShaderDesc(sg.queryBackend());
26         Vertex Shader: vs_offscreen
27         Fragment Shader: fs_offscreen
28         Attributes:
29             ATTR_OFFSCREEN_POSITION => 0
30             ATTR_OFFSCREEN_NORMAL => 1
31     Bindings:
32         Uniform block 'vs_params':
33             D struct: VsParams
34             Bind slot: UB_VS_PARAMS => 0
35         Image 'tex':
36             Image type: sg.ImageType._2d
37             Sample type: sg.ImageSampleType.Float
38             Multisampled: false
39             Bind slot: IMG_TEX => 0
40         Sampler 'smp':
41             Type: sg.SamplerType.Filtering
42             Bind slot: SMP_SMP => 0
43         Image Sampler Pair 'tex_smp':
44             Image: tex
45             Sampler: smp
46 */
47 enum ATTR_DEFAULT_POSITION = 0;
48 enum ATTR_DEFAULT_NORMAL = 1;
49 enum ATTR_DEFAULT_TEXCOORD0 = 2;
50 enum ATTR_OFFSCREEN_POSITION = 0;
51 enum ATTR_OFFSCREEN_NORMAL = 1;
52 enum UB_VS_PARAMS = 0;
53 enum IMG_TEX = 0;
54 enum SMP_SMP = 0;
55 struct VsParams {
56     align(16) m.Mat4 mvp;
57 }
58 /*
59     #version 410
60 
61     uniform vec4 vs_params[4];
62     layout(location = 0) in vec4 position;
63     layout(location = 0) out vec4 nrm;
64     layout(location = 1) in vec4 normal;
65 
66     void main()
67     {
68         gl_Position = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * position;
69         nrm = normal;
70     }
71 
72 */
73 __gshared char[280] VS_OFFSCREEN_SOURCE_GLSL410 = [
74     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
75     0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,0x5f,0x70,0x61,
76     0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
77     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
78     0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
79     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
80     0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x72,
81     0x6d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
82     0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,
83     0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,
84     0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,
85     0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,
86     0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,
87     0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,
88     0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
89     0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
90     0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,
91     0x61,0x6c,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
92 ];
93 /*
94     #version 410
95 
96     layout(location = 0) out vec4 frag_color;
97     layout(location = 0) in vec4 nrm;
98 
99     void main()
100     {
101         frag_color = vec4((nrm.xyz * 0.5) + vec3(0.5), 1.0);
102     }
103 
104 */
105 __gshared char[166] FS_OFFSCREEN_SOURCE_GLSL410 = [
106     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x6c,0x61,
107     0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
108     0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,
109     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
110     0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,
111     0x76,0x65,0x63,0x34,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,
112     0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,
113     0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,
114     0x6e,0x72,0x6d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2b,
115     0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,
116     0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
117 ];
118 /*
119     #version 410
120 
121     uniform vec4 vs_params[4];
122     layout(location = 0) in vec4 position;
123     layout(location = 1) out vec2 uv;
124     layout(location = 2) in vec2 texcoord0;
125     layout(location = 0) out vec4 nrm;
126     layout(location = 1) in vec4 normal;
127 
128     void main()
129     {
130         mat4 _22 = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]);
131         gl_Position = _22 * position;
132         uv = texcoord0;
133         nrm = _22 * normal;
134     }
135 
136 */
137 __gshared char[400] VS_DEFAULT_SOURCE_GLSL410 = [
138     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
139     0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,0x5f,0x70,0x61,
140     0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
141     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
142     0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
143     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
144     0x3d,0x20,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,
145     0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
146     0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x74,
147     0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
148     0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,
149     0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x6c,0x61,0x79,
150     0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,
151     0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
152     0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
153     0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x34,0x20,0x5f,0x32,0x32,0x20,0x3d,0x20,
154     0x6d,0x61,0x74,0x34,0x28,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,
155     0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,
156     0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,
157     0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x3b,0x0a,0x20,0x20,
158     0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
159     0x5f,0x32,0x32,0x20,0x2a,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
160     0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,
161     0x64,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x5f,0x32,
162     0x32,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
163 
164 ];
165 /*
166     #version 410
167 
168     uniform sampler2D tex_smp;
169 
170     layout(location = 1) in vec2 uv;
171     layout(location = 0) in vec4 nrm;
172     layout(location = 0) out vec4 frag_color;
173 
174     void main()
175     {
176         frag_color = vec4(texture(tex_smp, uv * vec2(20.0, 10.0)).xyz * fma(clamp(dot(nrm.xyz, vec3(0.57735025882720947265625, 0.57735025882720947265625, -0.57735025882720947265625)), 0.0, 1.0), 2.0, 0.25), 1.0);
177     }
178 
179 */
180 __gshared char[379] FS_DEFAULT_SOURCE_GLSL410 = [
181     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
182     0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
183     0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
184     0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,
185     0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
186     0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,
187     0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x6c,0x61,0x79,
188     0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,
189     0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,
190     0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
191     0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
192     0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x74,0x65,0x78,0x74,
193     0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x20,
194     0x2a,0x20,0x76,0x65,0x63,0x32,0x28,0x32,0x30,0x2e,0x30,0x2c,0x20,0x31,0x30,0x2e,
195     0x30,0x29,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x66,0x6d,0x61,0x28,0x63,0x6c,
196     0x61,0x6d,0x70,0x28,0x64,0x6f,0x74,0x28,0x6e,0x72,0x6d,0x2e,0x78,0x79,0x7a,0x2c,
197     0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,0x32,0x35,
198     0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,0x32,0x35,0x2c,
199     0x20,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,
200     0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,0x32,0x35,0x2c,0x20,0x2d,0x30,0x2e,0x35,
201     0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,
202     0x32,0x36,0x35,0x36,0x32,0x35,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,
203     0x2e,0x30,0x29,0x2c,0x20,0x32,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x32,0x35,0x29,0x2c,
204     0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
205 ];
206 /*
207     #version 300 es
208 
209     uniform vec4 vs_params[4];
210     layout(location = 0) in vec4 position;
211     out vec4 nrm;
212     layout(location = 1) in vec4 normal;
213 
214     void main()
215     {
216         gl_Position = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * position;
217         nrm = normal;
218     }
219 
220 */
221 __gshared char[262] VS_OFFSCREEN_SOURCE_GLSL300ES = [
222     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
223     0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,
224     0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
225     0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,
226     0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
227     0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x72,0x6d,0x3b,
228     0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
229     0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x6f,
230     0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
231     0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
232     0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,0x5f,0x70,
233     0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,
234     0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
235     0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
236     0x33,0x5d,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
237     0x20,0x20,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
238     0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
239 ];
240 /*
241     #version 300 es
242     precision mediump float;
243     precision highp int;
244 
245     layout(location = 0) out highp vec4 frag_color;
246     in highp vec4 nrm;
247 
248     void main()
249     {
250         frag_color = vec4((nrm.xyz * 0.5) + vec3(0.5), 1.0);
251     }
252 
253 */
254 __gshared char[206] FS_OFFSCREEN_SOURCE_GLSL300ES = [
255     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
256     0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
257     0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
258     0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x6c,
259     0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
260     0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
261     0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,
262     0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x72,0x6d,
263     0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
264     0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
265     0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x6e,0x72,0x6d,0x2e,0x78,0x79,0x7a,0x20,
266     0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
267     0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
268 ];
269 /*
270     #version 300 es
271 
272     uniform vec4 vs_params[4];
273     layout(location = 0) in vec4 position;
274     out vec2 uv;
275     layout(location = 2) in vec2 texcoord0;
276     out vec4 nrm;
277     layout(location = 1) in vec4 normal;
278 
279     void main()
280     {
281         mat4 _22 = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]);
282         gl_Position = _22 * position;
283         uv = texcoord0;
284         nrm = _22 * normal;
285     }
286 
287 */
288 __gshared char[361] VS_DEFAULT_SOURCE_GLSL300ES = [
289     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
290     0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,
291     0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
292     0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,
293     0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
294     0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,
295     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
296     0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x74,0x65,0x78,
297     0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,
298     0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
299     0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,
300     0x63,0x34,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,
301     0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,
302     0x74,0x34,0x20,0x5f,0x32,0x32,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,
303     0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,
304     0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,
305     0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
306     0x73,0x5b,0x33,0x5d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,
307     0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x32,0x32,0x20,0x2a,0x20,0x70,
308     0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,
309     0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,0x20,
310     0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x5f,0x32,0x32,0x20,0x2a,0x20,0x6e,0x6f,0x72,
311     0x6d,0x61,0x6c,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
312 ];
313 /*
314     #version 300 es
315     precision mediump float;
316     precision highp int;
317 
318     uniform highp sampler2D tex_smp;
319 
320     in highp vec2 uv;
321     in highp vec4 nrm;
322     layout(location = 0) out highp vec4 frag_color;
323 
324     void main()
325     {
326         frag_color = vec4(texture(tex_smp, uv * vec2(20.0, 10.0)).xyz * (clamp(dot(nrm.xyz, vec3(0.57735025882720947265625, 0.57735025882720947265625, -0.57735025882720947265625)), 0.0, 1.0) * 2.0 + 0.25), 1.0);
327     }
328 
329 */
330 __gshared char[409] FS_DEFAULT_SOURCE_GLSL300ES = [
331     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
332     0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
333     0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
334     0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
335     0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
336     0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,
337     0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,
338     0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
339     0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,
340     0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,
341     0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
342     0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
343     0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
344     0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x74,0x65,0x78,0x74,0x75,
345     0x72,0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x20,0x2a,
346     0x20,0x76,0x65,0x63,0x32,0x28,0x32,0x30,0x2e,0x30,0x2c,0x20,0x31,0x30,0x2e,0x30,
347     0x29,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,
348     0x64,0x6f,0x74,0x28,0x6e,0x72,0x6d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,
349     0x33,0x28,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,
350     0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,
351     0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,
352     0x32,0x36,0x35,0x36,0x32,0x35,0x2c,0x20,0x2d,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,
353     0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,
354     0x32,0x35,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x20,
355     0x2a,0x20,0x32,0x2e,0x30,0x20,0x2b,0x20,0x30,0x2e,0x32,0x35,0x29,0x2c,0x20,0x31,
356     0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
357 ];
358 /*
359     cbuffer vs_params : register(b0)
360     {
361         row_major float4x4 _19_mvp : packoffset(c0);
362     };
363 
364 
365     static float4 gl_Position;
366     static float4 position;
367     static float4 nrm;
368     static float4 normal;
369 
370     struct SPIRV_Cross_Input
371     {
372         float4 position : TEXCOORD0;
373         float4 normal : TEXCOORD1;
374     };
375 
376     struct SPIRV_Cross_Output
377     {
378         float4 nrm : TEXCOORD0;
379         float4 gl_Position : SV_Position;
380     };
381 
382     void vert_main()
383     {
384         gl_Position = mul(position, _19_mvp);
385         nrm = normal;
386     }
387 
388     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
389     {
390         position = stage_input.position;
391         normal = stage_input.normal;
392         vert_main();
393         SPIRV_Cross_Output stage_output;
394         stage_output.gl_Position = gl_Position;
395         stage_output.nrm = nrm;
396         return stage_output;
397     }
398 */
399 __gshared char[738] VS_OFFSCREEN_SOURCE_HLSL5 = [
400     0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
401     0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x62,0x30,0x29,
402     0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72,
403     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,
404     0x70,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,
405     0x30,0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
406     0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
407     0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,
408     0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,
409     0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x73,
410     0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x6f,0x72,
411     0x6d,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,
412     0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,
413     0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x69,
414     0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,
415     0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x6f,0x72,
416     0x6d,0x61,0x6c,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,
417     0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,
418     0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,
419     0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x72,0x6d,0x20,
420     0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,
421     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
422     0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
423     0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x76,0x65,0x72,0x74,
424     0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,
425     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,
426     0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,
427     0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x6f,
428     0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,
429     0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
430     0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,
431     0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,
432     0x7b,0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
433     0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73,
434     0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,
435     0x6c,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,
436     0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x72,0x74,
437     0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,
438     0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,
439     0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,
440     0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x67,
441     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x67,0x6c,0x5f,
442     0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,
443     0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x6e,0x72,0x6d,0x20,0x3d,
444     0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
445     0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,
446     0x0a,0x00,
447 ];
448 /*
449     static float4 frag_color;
450     static float4 nrm;
451 
452     struct SPIRV_Cross_Input
453     {
454         float4 nrm : TEXCOORD0;
455     };
456 
457     struct SPIRV_Cross_Output
458     {
459         float4 frag_color : SV_Target0;
460     };
461 
462     void frag_main()
463     {
464         frag_color = float4((nrm.xyz * 0.5f) + 0.5f.xxx, 1.0f);
465     }
466 
467     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
468     {
469         nrm = stage_input.nrm;
470         frag_main();
471         SPIRV_Cross_Output stage_output;
472         stage_output.frag_color = frag_color;
473         return stage_output;
474     }
475 */
476 __gshared char[463] FS_OFFSCREEN_SOURCE_HLSL5 = [
477     0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,
478     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
479     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x0a,0x73,0x74,
480     0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,
481     0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
482     0x61,0x74,0x34,0x20,0x6e,0x72,0x6d,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,
483     0x52,0x44,0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
484     0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,
485     0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
486     0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x53,0x56,0x5f,
487     0x54,0x61,0x72,0x67,0x65,0x74,0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
488     0x64,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,
489     0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
490     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x6e,0x72,0x6d,0x2e,0x78,0x79,0x7a,
491     0x20,0x2a,0x20,0x30,0x2e,0x35,0x66,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x66,0x2e,
492     0x78,0x78,0x78,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,
493     0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,
494     0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,
495     0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,
496     0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x72,0x6d,0x20,
497     0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x6e,0x72,
498     0x6d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,
499     0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,
500     0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,
501     0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,
502     0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,
503     0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
504     0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,
505     0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
506 ];
507 /*
508     cbuffer vs_params : register(b0)
509     {
510         row_major float4x4 _19_mvp : packoffset(c0);
511     };
512 
513 
514     static float4 gl_Position;
515     static float4 position;
516     static float2 uv;
517     static float2 texcoord0;
518     static float4 nrm;
519     static float4 normal;
520 
521     struct SPIRV_Cross_Input
522     {
523         float4 position : TEXCOORD0;
524         float4 normal : TEXCOORD1;
525         float2 texcoord0 : TEXCOORD2;
526     };
527 
528     struct SPIRV_Cross_Output
529     {
530         float4 nrm : TEXCOORD0;
531         float2 uv : TEXCOORD1;
532         float4 gl_Position : SV_Position;
533     };
534 
535     void vert_main()
536     {
537         gl_Position = mul(position, _19_mvp);
538         uv = texcoord0;
539         nrm = mul(normal, _19_mvp);
540     }
541 
542     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
543     {
544         position = stage_input.position;
545         texcoord0 = stage_input.texcoord0;
546         normal = stage_input.normal;
547         vert_main();
548         SPIRV_Cross_Output stage_output;
549         stage_output.gl_Position = gl_Position;
550         stage_output.uv = uv;
551         stage_output.nrm = nrm;
552         return stage_output;
553     }
554 */
555 __gshared char[941] VS_DEFAULT_SOURCE_HLSL5 = [
556     0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
557     0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x62,0x30,0x29,
558     0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72,
559     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,
560     0x70,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,
561     0x30,0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
562     0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
563     0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,
564     0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,
565     0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x3b,0x0a,0x73,0x74,
566     0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,
567     0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,
568     0x6f,0x61,0x74,0x34,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
569     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,
570     0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,
571     0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
572     0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
573     0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,
574     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3a,
575     0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,
576     0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,
577     0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,0x7d,0x3b,
578     0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,
579     0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,
580     0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x72,0x6d,0x20,0x3a,0x20,0x54,
581     0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
582     0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,
583     0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
584     0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,
585     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,
586     0x6f,0x69,0x64,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
587     0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
588     0x6e,0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
589     0x2c,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
590     0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,
591     0x20,0x20,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,0x6e,0x6f,
592     0x72,0x6d,0x61,0x6c,0x2c,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,0x70,0x29,0x3b,0x0a,
593     0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,
594     0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,
595     0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,
596     0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
597     0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,
598     0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,
599     0x0a,0x20,0x20,0x20,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3d,
600     0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x74,0x65,0x78,
601     0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d,
602     0x61,0x6c,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,
603     0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x72,
604     0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,
605     0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,
606     0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,
607     0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,
608     0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x67,0x6c,
609     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,
610     0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,
611     0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,
612     0x75,0x74,0x70,0x75,0x74,0x2e,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x72,0x6d,0x3b,
613     0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x61,0x67,
614     0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
615 ];
616 /*
617     Texture2D<float4> tex : register(t0);
618     SamplerState smp : register(s0);
619 
620     static float2 uv;
621     static float4 nrm;
622     static float4 frag_color;
623 
624     struct SPIRV_Cross_Input
625     {
626         float4 nrm : TEXCOORD0;
627         float2 uv : TEXCOORD1;
628     };
629 
630     struct SPIRV_Cross_Output
631     {
632         float4 frag_color : SV_Target0;
633     };
634 
635     void frag_main()
636     {
637         frag_color = float4(tex.Sample(smp, uv * float2(20.0f, 10.0f)).xyz * mad(clamp(dot(nrm.xyz, float3(0.57735025882720947265625f, 0.57735025882720947265625f, -0.57735025882720947265625f)), 0.0f, 1.0f), 2.0f, 0.25f), 1.0f);
638     }
639 
640     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
641     {
642         uv = stage_input.uv;
643         nrm = stage_input.nrm;
644         frag_main();
645         SPIRV_Cross_Output stage_output;
646         stage_output.frag_color = frag_color;
647         return stage_output;
648     }
649 */
650 __gshared char[769] FS_DEFAULT_SOURCE_HLSL5 = [
651     0x54,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,
652     0x3e,0x20,0x74,0x65,0x78,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,
653     0x28,0x74,0x30,0x29,0x3b,0x0a,0x53,0x61,0x6d,0x70,0x6c,0x65,0x72,0x53,0x74,0x61,
654     0x74,0x65,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,
655     0x72,0x28,0x73,0x30,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,
656     0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
657     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x73,0x74,0x61,
658     0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,
659     0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,
660     0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,
661     0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x72,
662     0x6d,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,
663     0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20,0x54,
664     0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,
665     0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,
666     0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
667     0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
668     0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72,0x67,0x65,0x74,0x30,0x3b,0x0a,0x7d,0x3b,
669     0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,
670     0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
671     0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x74,0x65,0x78,
672     0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x20,
673     0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x32,0x30,0x2e,0x30,0x66,0x2c,0x20,
674     0x31,0x30,0x2e,0x30,0x66,0x29,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x6d,0x61,
675     0x64,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x64,0x6f,0x74,0x28,0x6e,0x72,0x6d,0x2e,
676     0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,0x37,
677     0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,
678     0x36,0x35,0x36,0x32,0x35,0x66,0x2c,0x20,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,
679     0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,0x32,
680     0x35,0x66,0x2c,0x20,0x2d,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,
681     0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,0x32,0x35,0x66,0x29,
682     0x29,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x2c,0x20,
683     0x32,0x2e,0x30,0x66,0x2c,0x20,0x30,0x2e,0x32,0x35,0x66,0x29,0x2c,0x20,0x31,0x2e,
684     0x30,0x66,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,
685     0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,
686     0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,
687     0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,
688     0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,
689     0x69,0x6e,0x70,0x75,0x74,0x2e,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x72,
690     0x6d,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,
691     0x6e,0x72,0x6d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,
692     0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,
693     0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,
694     0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,
695     0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,
696     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
697     0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
698     0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,
699     0x00,
700 ];
701 /*
702     #include <metal_stdlib>
703     #include <simd/simd.h>
704 
705     using namespace metal;
706 
707     struct vs_params
708     {
709         float4x4 mvp;
710     };
711 
712     struct main0_out
713     {
714         float4 nrm [[user(locn0)]];
715         float4 gl_Position [[position]];
716     };
717 
718     struct main0_in
719     {
720         float4 position [[attribute(0)]];
721         float4 normal [[attribute(1)]];
722     };
723 
724     vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _19 [[buffer(0)]])
725     {
726         main0_out out = {};
727         out.gl_Position = _19.mvp * in.position;
728         out.nrm = in.normal;
729         return out;
730     }
731 
732 */
733 __gshared char[505] VS_OFFSCREEN_SOURCE_METAL_MACOS = [
734     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
735     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
736     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
737     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
738     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76,
739     0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
740     0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,0x76,0x70,0x3b,0x0a,0x7d,0x3b,0x0a,
741     0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
742     0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,
743     0x72,0x6d,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,
744     0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,
745     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,
746     0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,
747     0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,
748     0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,
749     0x6f,0x6e,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,
750     0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
751     0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,
752     0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,
753     0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,
754     0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,
755     0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,
756     0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
757     0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,
758     0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,
759     0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,
760     0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
761     0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x39,0x2e,0x6d,0x76,0x70,0x20,0x2a,0x20,0x69,
762     0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,
763     0x6f,0x75,0x74,0x2e,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x6e,0x6f,0x72,
764     0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
765     0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
766 ];
767 /*
768     #include <metal_stdlib>
769     #include <simd/simd.h>
770 
771     using namespace metal;
772 
773     struct main0_out
774     {
775         float4 frag_color [[color(0)]];
776     };
777 
778     struct main0_in
779     {
780         float4 nrm [[user(locn0)]];
781     };
782 
783     fragment main0_out main0(main0_in in [[stage_in]])
784     {
785         main0_out out = {};
786         out.frag_color = float4((in.nrm.xyz * 0.5) + float3(0.5), 1.0);
787         return out;
788     }
789 
790 */
791 __gshared char[350] FS_OFFSCREEN_SOURCE_METAL_MACOS = [
792     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
793     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
794     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
795     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
796     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
797     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
798     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
799     0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
800     0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
801     0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
802     0x6e,0x72,0x6d,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,
803     0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,
804     0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,
805     0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,
806     0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,
807     0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,
808     0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,
809     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
810     0x34,0x28,0x28,0x69,0x6e,0x2e,0x6e,0x72,0x6d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,
811     0x30,0x2e,0x35,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
812     0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
813     0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
814 ];
815 /*
816     #include <metal_stdlib>
817     #include <simd/simd.h>
818 
819     using namespace metal;
820 
821     struct vs_params
822     {
823         float4x4 mvp;
824     };
825 
826     struct main0_out
827     {
828         float4 nrm [[user(locn0)]];
829         float2 uv [[user(locn1)]];
830         float4 gl_Position [[position]];
831     };
832 
833     struct main0_in
834     {
835         float4 position [[attribute(0)]];
836         float4 normal [[attribute(1)]];
837         float2 texcoord0 [[attribute(2)]];
838     };
839 
840     vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _19 [[buffer(0)]])
841     {
842         main0_out out = {};
843         out.gl_Position = _19.mvp * in.position;
844         out.uv = in.texcoord0;
845         out.nrm = _19.mvp * in.normal;
846         return out;
847     }
848 
849 */
850 __gshared char[612] VS_DEFAULT_SOURCE_METAL_MACOS = [
851     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
852     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
853     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
854     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
855     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76,
856     0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
857     0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,0x76,0x70,0x3b,0x0a,0x7d,0x3b,0x0a,
858     0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
859     0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,
860     0x72,0x6d,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,
861     0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,
862     0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,0x29,0x5d,
863     0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,
864     0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,
865     0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,
866     0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,
867     0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
868     0x6e,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,
869     0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,
870     0x6f,0x72,0x6d,0x61,0x6c,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,
871     0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
872     0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x5b,0x5b,0x61,
873     0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
874     0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
875     0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,
876     0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,
877     0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x73,0x5f,
878     0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b,0x62,0x75,
879     0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
880     0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,
881     0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,
882     0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x39,0x2e,0x6d,
883     0x76,0x70,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
884     0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,
885     0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,0x20,
886     0x20,0x6f,0x75,0x74,0x2e,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x5f,0x31,0x39,0x2e,0x6d,
887     0x76,0x70,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,
888     0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,
889     0x7d,0x0a,0x0a,0x00,
890 ];
891 /*
892     #include <metal_stdlib>
893     #include <simd/simd.h>
894 
895     using namespace metal;
896 
897     struct main0_out
898     {
899         float4 frag_color [[color(0)]];
900     };
901 
902     struct main0_in
903     {
904         float4 nrm [[user(locn0)]];
905         float2 uv [[user(locn1)]];
906     };
907 
908     fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex [[texture(0)]], sampler smp [[sampler(0)]])
909     {
910         main0_out out = {};
911         out.frag_color = float4(tex.sample(smp, (in.uv * float2(20.0, 10.0))).xyz * fma(fast::clamp(dot(in.nrm.xyz, float3(0.57735025882720947265625, 0.57735025882720947265625, -0.57735025882720947265625)), 0.0, 1.0), 2.0, 0.25), 1.0);
912         return out;
913     }
914 
915 */
916 __gshared char[610] FS_DEFAULT_SOURCE_METAL_MACOS = [
917     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
918     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
919     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
920     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
921     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
922     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
923     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
924     0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
925     0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
926     0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
927     0x6e,0x72,0x6d,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,
928     0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
929     0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,0x29,
930     0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,
931     0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,
932     0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,
933     0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,
934     0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65,0x78,0x20,
935     0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,
936     0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,
937     0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,
938     0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,
939     0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,
940     0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
941     0x34,0x28,0x74,0x65,0x78,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,
942     0x2c,0x20,0x28,0x69,0x6e,0x2e,0x75,0x76,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,
943     0x32,0x28,0x32,0x30,0x2e,0x30,0x2c,0x20,0x31,0x30,0x2e,0x30,0x29,0x29,0x29,0x2e,
944     0x78,0x79,0x7a,0x20,0x2a,0x20,0x66,0x6d,0x61,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,
945     0x63,0x6c,0x61,0x6d,0x70,0x28,0x64,0x6f,0x74,0x28,0x69,0x6e,0x2e,0x6e,0x72,0x6d,
946     0x2e,0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,
947     0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,
948     0x32,0x36,0x35,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,
949     0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,0x32,
950     0x35,0x2c,0x20,0x2d,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,
951     0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x35,0x36,0x32,0x35,0x29,0x29,0x2c,
952     0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x2c,0x20,0x32,0x2e,0x30,0x2c,
953     0x20,0x30,0x2e,0x32,0x35,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
954     0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,
955     0x0a,0x00,
956 ];
957 /*
958     diagnostic(off, derivative_uniformity);
959 
960     struct vs_params {
961       /_ @offset(0) _/
962       mvp : mat4x4f,
963     }
964 
965     @group(0) @binding(0) var<uniform> x_19 : vs_params;
966 
967     var<private> position_1 : vec4f;
968 
969     var<private> nrm : vec4f;
970 
971     var<private> normal : vec4f;
972 
973     var<private> gl_Position : vec4f;
974 
975     fn main_1() {
976       let x_22 : mat4x4f = x_19.mvp;
977       let x_25 : vec4f = position_1;
978       gl_Position = (x_22 * x_25);
979       let x_31 : vec4f = normal;
980       nrm = x_31;
981       return;
982     }
983 
984     struct main_out {
985       @builtin(position)
986       gl_Position : vec4f,
987       @location(0)
988       nrm_1 : vec4f,
989     }
990 
991     @vertex
992     fn main(@location(0) position_1_param : vec4f, @location(1) normal_param : vec4f) -> main_out {
993       position_1 = position_1_param;
994       normal = normal_param;
995       main_1();
996       return main_out(gl_Position, nrm);
997     }
998 
999 */
1000 __gshared char[758] VS_OFFSCREEN_SOURCE_WGSL = [
1001     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1002     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1003     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
1004     0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x7b,0x0a,0x20,0x20,0x2f,0x2a,
1005     0x20,0x40,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x30,0x29,0x20,0x2a,0x2f,0x0a,0x20,
1006     0x20,0x6d,0x76,0x70,0x20,0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x2c,0x0a,
1007     0x7d,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x30,0x29,0x20,0x40,0x62,0x69,
1008     0x6e,0x64,0x69,0x6e,0x67,0x28,0x30,0x29,0x20,0x76,0x61,0x72,0x3c,0x75,0x6e,0x69,
1009     0x66,0x6f,0x72,0x6d,0x3e,0x20,0x78,0x5f,0x31,0x39,0x20,0x3a,0x20,0x76,0x73,0x5f,
1010     0x70,0x61,0x72,0x61,0x6d,0x73,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1011     0x76,0x61,0x74,0x65,0x3e,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,
1012     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,
1013     0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x6e,0x72,0x6d,0x20,0x3a,0x20,0x76,0x65,
1014     0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,
1015     0x65,0x3e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,
1016     0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,
1017     0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,
1018     0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,
1019     0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x32,0x20,
1020     0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x31,0x39,
1021     0x2e,0x6d,0x76,0x70,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x35,
1022     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x69,0x74,
1023     0x69,0x6f,0x6e,0x5f,0x31,0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
1024     0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x78,0x5f,0x32,0x32,0x20,0x2a,0x20,0x78,
1025     0x5f,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x31,
1026     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,
1027     0x6c,0x3b,0x0a,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x78,0x5f,0x33,0x31,0x3b,
1028     0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,
1029     0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,
1030     0x20,0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69,0x6e,0x28,0x70,0x6f,0x73,0x69,0x74,
1031     0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
1032     0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,
1033     0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x6e,0x72,0x6d,
1034     0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,
1035     0x76,0x65,0x72,0x74,0x65,0x78,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,
1036     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x70,0x6f,0x73,0x69,
1037     0x74,0x69,0x6f,0x6e,0x5f,0x31,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,
1038     0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,
1039     0x31,0x29,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,
1040     0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,
1041     0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
1042     0x6e,0x5f,0x31,0x20,0x3d,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,
1043     0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
1044     0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,
1045     0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,
1046     0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x67,
1047     0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x6e,0x72,0x6d,0x29,
1048     0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1049 ];
1050 /*
1051     diagnostic(off, derivative_uniformity);
1052 
1053     var<private> frag_color : vec4f;
1054 
1055     var<private> nrm : vec4f;
1056 
1057     fn main_1() {
1058       let x_13 : vec4f = nrm;
1059       let x_18 : vec3f = ((vec3f(x_13.x, x_13.y, x_13.z) * 0.5f) + vec3f(0.5f, 0.5f, 0.5f));
1060       frag_color = vec4f(x_18.x, x_18.y, x_18.z, 1.0f);
1061       return;
1062     }
1063 
1064     struct main_out {
1065       @location(0)
1066       frag_color_1 : vec4f,
1067     }
1068 
1069     @fragment
1070     fn main(@location(0) nrm_param : vec4f) -> main_out {
1071       nrm = nrm_param;
1072       main_1();
1073       return main_out(frag_color);
1074     }
1075 
1076 */
1077 __gshared char[486] FS_OFFSCREEN_SOURCE_WGSL = [
1078     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1079     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1080     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1081     0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
1082     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,
1083     0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x6e,0x72,0x6d,0x20,0x3a,0x20,0x76,0x65,
1084     0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,
1085     0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x33,0x20,0x3a,
1086     0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x20,0x20,
1087     0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x38,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,
1088     0x20,0x3d,0x20,0x28,0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x31,0x33,0x2e,
1089     0x78,0x2c,0x20,0x78,0x5f,0x31,0x33,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x31,0x33,0x2e,
1090     0x7a,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x66,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,
1091     0x33,0x66,0x28,0x30,0x2e,0x35,0x66,0x2c,0x20,0x30,0x2e,0x35,0x66,0x2c,0x20,0x30,
1092     0x2e,0x35,0x66,0x29,0x29,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
1093     0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x78,0x5f,0x31,0x38,
1094     0x2e,0x78,0x2c,0x20,0x78,0x5f,0x31,0x38,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x31,0x38,
1095     0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,
1096     0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
1097     0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,
1098     0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
1099     0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,
1100     0x0a,0x7d,0x0a,0x0a,0x40,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,
1101     0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,
1102     0x30,0x29,0x20,0x6e,0x72,0x6d,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,
1103     0x65,0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,
1104     0x74,0x20,0x7b,0x0a,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x72,0x6d,0x5f,
1105     0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,
1106     0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,
1107     0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,
1108     0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1109 ];
1110 /*
1111     diagnostic(off, derivative_uniformity);
1112 
1113     struct vs_params {
1114       /_ @offset(0) _/
1115       mvp : mat4x4f,
1116     }
1117 
1118     @group(0) @binding(0) var<uniform> x_19 : vs_params;
1119 
1120     var<private> position_1 : vec4f;
1121 
1122     var<private> uv : vec2f;
1123 
1124     var<private> texcoord0 : vec2f;
1125 
1126     var<private> nrm : vec4f;
1127 
1128     var<private> normal : vec4f;
1129 
1130     var<private> gl_Position : vec4f;
1131 
1132     fn main_1() {
1133       let x_22 : mat4x4f = x_19.mvp;
1134       let x_25 : vec4f = position_1;
1135       gl_Position = (x_22 * x_25);
1136       let x_34 : vec2f = texcoord0;
1137       uv = x_34;
1138       let x_37 : mat4x4f = x_19.mvp;
1139       let x_39 : vec4f = normal;
1140       nrm = (x_37 * x_39);
1141       return;
1142     }
1143 
1144     struct main_out {
1145       @builtin(position)
1146       gl_Position : vec4f,
1147       @location(1)
1148       uv_1 : vec2f,
1149       @location(0)
1150       nrm_1 : vec4f,
1151     }
1152 
1153     @vertex
1154     fn main(@location(0) position_1_param : vec4f, @location(2) texcoord0_param : vec2f, @location(1) normal_param : vec4f) -> main_out {
1155       position_1 = position_1_param;
1156       texcoord0 = texcoord0_param;
1157       normal = normal_param;
1158       main_1();
1159       return main_out(gl_Position, uv, nrm);
1160     }
1161 
1162 */
1163 __gshared char[1008] VS_DEFAULT_SOURCE_WGSL = [
1164     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1165     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1166     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
1167     0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x7b,0x0a,0x20,0x20,0x2f,0x2a,
1168     0x20,0x40,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x30,0x29,0x20,0x2a,0x2f,0x0a,0x20,
1169     0x20,0x6d,0x76,0x70,0x20,0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x2c,0x0a,
1170     0x7d,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x30,0x29,0x20,0x40,0x62,0x69,
1171     0x6e,0x64,0x69,0x6e,0x67,0x28,0x30,0x29,0x20,0x76,0x61,0x72,0x3c,0x75,0x6e,0x69,
1172     0x66,0x6f,0x72,0x6d,0x3e,0x20,0x78,0x5f,0x31,0x39,0x20,0x3a,0x20,0x76,0x73,0x5f,
1173     0x70,0x61,0x72,0x61,0x6d,0x73,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
1174     0x76,0x61,0x74,0x65,0x3e,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,
1175     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,
1176     0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,0x20,0x76,0x65,0x63,
1177     0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,
1178     0x3e,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3a,0x20,0x76,0x65,
1179     0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,
1180     0x65,0x3e,0x20,0x6e,0x72,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,
1181     0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x6e,0x6f,
1182     0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,
1183     0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x67,0x6c,0x5f,0x50,
1184     0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,
1185     0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,
1186     0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x32,0x20,0x3a,0x20,0x6d,0x61,0x74,
1187     0x34,0x78,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x31,0x39,0x2e,0x6d,0x76,0x70,0x3b,
1188     0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x35,0x20,0x3a,0x20,0x76,0x65,
1189     0x63,0x34,0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,
1190     0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
1191     0x3d,0x20,0x28,0x78,0x5f,0x32,0x32,0x20,0x2a,0x20,0x78,0x5f,0x32,0x35,0x29,0x3b,
1192     0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x34,0x20,0x3a,0x20,0x76,0x65,
1193     0x63,0x32,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,
1194     0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x78,0x5f,0x33,0x34,0x3b,0x0a,0x20,0x20,
1195     0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x37,0x20,0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,
1196     0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x31,0x39,0x2e,0x6d,0x76,0x70,0x3b,0x0a,0x20,
1197     0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,
1198     0x66,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x6e,0x72,
1199     0x6d,0x20,0x3d,0x20,0x28,0x78,0x5f,0x33,0x37,0x20,0x2a,0x20,0x78,0x5f,0x33,0x39,
1200     0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,
1201     0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,
1202     0x7b,0x0a,0x20,0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69,0x6e,0x28,0x70,0x6f,0x73,
1203     0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
1204     0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,
1205     0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x0a,0x20,0x20,0x75,
1206     0x76,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x0a,0x20,0x20,0x40,
1207     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x6e,0x72,
1208     0x6d,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,
1209     0x40,0x76,0x65,0x72,0x74,0x65,0x78,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,
1210     0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x70,0x6f,0x73,
1211     0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,
1212     0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
1213     0x28,0x32,0x29,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x5f,0x70,0x61,
1214     0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,
1215     0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
1216     0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x29,0x20,
1217     0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,
1218     0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,0x20,0x3d,0x20,0x70,0x6f,0x73,
1219     0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,
1220     0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3d,0x20,0x74,0x65,0x78,
1221     0x63,0x6f,0x6f,0x72,0x64,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,
1222     0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,
1223     0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,
1224     0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,
1225     0x5f,0x6f,0x75,0x74,0x28,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
1226     0x2c,0x20,0x75,0x76,0x2c,0x20,0x6e,0x72,0x6d,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
1227 
1228 ];
1229 /*
1230     diagnostic(off, derivative_uniformity);
1231 
1232     @group(1) @binding(64) var tex : texture_2d<f32>;
1233 
1234     @group(1) @binding(80) var smp : sampler;
1235 
1236     var<private> uv : vec2f;
1237 
1238     var<private> nrm : vec4f;
1239 
1240     var<private> frag_color : vec4f;
1241 
1242     fn main_1() {
1243       var c : vec4f;
1244       var l : f32;
1245       let x_23 : vec2f = uv;
1246       let x_28 : vec4f = textureSample(tex, smp, (x_23 * vec2f(20.0f, 10.0f)));
1247       c = x_28;
1248       let x_34 : vec4f = nrm;
1249       l = (clamp(dot(vec3f(x_34.x, x_34.y, x_34.z), vec3f(0.57735025882720947266f, 0.57735025882720947266f, -0.57735025882720947266f)), 0.0f, 1.0f) * 2.0f);
1250       let x_47 : vec4f = c;
1251       let x_49 : f32 = l;
1252       let x_52 : vec3f = (vec3f(x_47.x, x_47.y, x_47.z) * (x_49 + 0.25f));
1253       frag_color = vec4f(x_52.x, x_52.y, x_52.z, 1.0f);
1254       return;
1255     }
1256 
1257     struct main_out {
1258       @location(0)
1259       frag_color_1 : vec4f,
1260     }
1261 
1262     @fragment
1263     fn main(@location(1) uv_param : vec2f, @location(0) nrm_param : vec4f) -> main_out {
1264       uv = uv_param;
1265       nrm = nrm_param;
1266       main_1();
1267       return main_out(frag_color);
1268     }
1269 
1270 */
1271 __gshared char[980] FS_DEFAULT_SOURCE_WGSL = [
1272     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
1273     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
1274     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,
1275     0x31,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x36,0x34,0x29,0x20,
1276     0x76,0x61,0x72,0x20,0x74,0x65,0x78,0x20,0x3a,0x20,0x74,0x65,0x78,0x74,0x75,0x72,
1277     0x65,0x5f,0x32,0x64,0x3c,0x66,0x33,0x32,0x3e,0x3b,0x0a,0x0a,0x40,0x67,0x72,0x6f,
1278     0x75,0x70,0x28,0x31,0x29,0x20,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x38,
1279     0x30,0x29,0x20,0x76,0x61,0x72,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x73,0x61,0x6d,
1280     0x70,0x6c,0x65,0x72,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,
1281     0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,
1282     0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x6e,0x72,
1283     0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,
1284     0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
1285     0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,
1286     0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x76,0x61,
1287     0x72,0x20,0x63,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x20,0x20,0x76,
1288     0x61,0x72,0x20,0x6c,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x20,0x20,0x6c,0x65,
1289     0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,
1290     0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x38,0x20,
1291     0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,
1292     0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x2c,0x20,0x73,0x6d,0x70,
1293     0x2c,0x20,0x28,0x78,0x5f,0x32,0x33,0x20,0x2a,0x20,0x76,0x65,0x63,0x32,0x66,0x28,
1294     0x32,0x30,0x2e,0x30,0x66,0x2c,0x20,0x31,0x30,0x2e,0x30,0x66,0x29,0x29,0x29,0x3b,
1295     0x0a,0x20,0x20,0x63,0x20,0x3d,0x20,0x78,0x5f,0x32,0x38,0x3b,0x0a,0x20,0x20,0x6c,
1296     0x65,0x74,0x20,0x78,0x5f,0x33,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,
1297     0x3d,0x20,0x6e,0x72,0x6d,0x3b,0x0a,0x20,0x20,0x6c,0x20,0x3d,0x20,0x28,0x63,0x6c,
1298     0x61,0x6d,0x70,0x28,0x64,0x6f,0x74,0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,
1299     0x33,0x34,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x33,0x34,0x2e,0x79,0x2c,0x20,0x78,0x5f,
1300     0x33,0x34,0x2e,0x7a,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x66,0x28,0x30,0x2e,0x35,
1301     0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,
1302     0x32,0x36,0x36,0x66,0x2c,0x20,0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,0x32,0x35,
1303     0x38,0x38,0x32,0x37,0x32,0x30,0x39,0x34,0x37,0x32,0x36,0x36,0x66,0x2c,0x20,0x2d,
1304     0x30,0x2e,0x35,0x37,0x37,0x33,0x35,0x30,0x32,0x35,0x38,0x38,0x32,0x37,0x32,0x30,
1305     0x39,0x34,0x37,0x32,0x36,0x36,0x66,0x29,0x29,0x2c,0x20,0x30,0x2e,0x30,0x66,0x2c,
1306     0x20,0x31,0x2e,0x30,0x66,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x66,0x29,0x3b,0x0a,
1307     0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,
1308     0x34,0x66,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,
1309     0x34,0x39,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x6c,0x3b,0x0a,0x20,0x20,
1310     0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x32,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,
1311     0x20,0x3d,0x20,0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x34,0x37,0x2e,0x78,
1312     0x2c,0x20,0x78,0x5f,0x34,0x37,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x34,0x37,0x2e,0x7a,
1313     0x29,0x20,0x2a,0x20,0x28,0x78,0x5f,0x34,0x39,0x20,0x2b,0x20,0x30,0x2e,0x32,0x35,
1314     0x66,0x29,0x29,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
1315     0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x78,0x5f,0x35,0x32,0x2e,0x78,
1316     0x2c,0x20,0x78,0x5f,0x35,0x32,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x35,0x32,0x2e,0x7a,
1317     0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
1318     0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,
1319     0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,
1320     0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
1321     0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,
1322     0x0a,0x0a,0x40,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,
1323     0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,
1324     0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,
1325     0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,
1326     0x6e,0x72,0x6d,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,
1327     0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,
1328     0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61,0x6d,
1329     0x3b,0x0a,0x20,0x20,0x6e,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x72,0x6d,0x5f,0x70,0x61,
1330     0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,
1331     0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,
1332     0x75,0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,
1333     0x7d,0x0a,0x0a,0x00,
1334 ];
1335 sg.ShaderDesc defaultShaderDesc(sg.Backend backend) @trusted @nogc nothrow {
1336     sg.ShaderDesc desc;
1337     desc.label = "default_shader";
1338     switch (backend) {
1339         case sg.Backend.Glcore:
1340             desc.vertex_func.source = &VS_DEFAULT_SOURCE_GLSL410[0];
1341             desc.vertex_func.entry = "main";
1342             desc.fragment_func.source = &FS_DEFAULT_SOURCE_GLSL410[0];
1343             desc.fragment_func.entry = "main";
1344             desc.attrs[0].glsl_name = "position";
1345             desc.attrs[1].glsl_name = "normal";
1346             desc.attrs[2].glsl_name = "texcoord0";
1347             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1348             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1349             desc.uniform_blocks[0].size = 64;
1350             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
1351             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
1352             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
1353             desc.images[0].stage = sg.ShaderStage.Fragment;
1354             desc.images[0].multisampled = false;
1355             desc.images[0].image_type = sg.ImageType._2d;
1356             desc.images[0].sample_type = sg.ImageSampleType.Float;
1357             desc.samplers[0].stage = sg.ShaderStage.Fragment;
1358             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
1359             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
1360             desc.image_sampler_pairs[0].image_slot = 0;
1361             desc.image_sampler_pairs[0].sampler_slot = 0;
1362             desc.image_sampler_pairs[0].glsl_name = "tex_smp";
1363             break;
1364         case sg.Backend.Gles3:
1365             desc.vertex_func.source = &VS_DEFAULT_SOURCE_GLSL300ES[0];
1366             desc.vertex_func.entry = "main";
1367             desc.fragment_func.source = &FS_DEFAULT_SOURCE_GLSL300ES[0];
1368             desc.fragment_func.entry = "main";
1369             desc.attrs[0].glsl_name = "position";
1370             desc.attrs[1].glsl_name = "normal";
1371             desc.attrs[2].glsl_name = "texcoord0";
1372             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1373             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1374             desc.uniform_blocks[0].size = 64;
1375             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
1376             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
1377             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
1378             desc.images[0].stage = sg.ShaderStage.Fragment;
1379             desc.images[0].multisampled = false;
1380             desc.images[0].image_type = sg.ImageType._2d;
1381             desc.images[0].sample_type = sg.ImageSampleType.Float;
1382             desc.samplers[0].stage = sg.ShaderStage.Fragment;
1383             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
1384             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
1385             desc.image_sampler_pairs[0].image_slot = 0;
1386             desc.image_sampler_pairs[0].sampler_slot = 0;
1387             desc.image_sampler_pairs[0].glsl_name = "tex_smp";
1388             break;
1389         case sg.Backend.D3d11:
1390             desc.vertex_func.source = &VS_DEFAULT_SOURCE_HLSL5[0];
1391             desc.vertex_func.d3d11_target = "vs_5_0";
1392             desc.vertex_func.entry = "main";
1393             desc.fragment_func.source = &FS_DEFAULT_SOURCE_HLSL5[0];
1394             desc.fragment_func.d3d11_target = "ps_5_0";
1395             desc.fragment_func.entry = "main";
1396             desc.attrs[0].hlsl_sem_name = "TEXCOORD";
1397             desc.attrs[0].hlsl_sem_index = 0;
1398             desc.attrs[1].hlsl_sem_name = "TEXCOORD";
1399             desc.attrs[1].hlsl_sem_index = 1;
1400             desc.attrs[2].hlsl_sem_name = "TEXCOORD";
1401             desc.attrs[2].hlsl_sem_index = 2;
1402             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1403             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1404             desc.uniform_blocks[0].size = 64;
1405             desc.uniform_blocks[0].hlsl_register_b_n = 0;
1406             desc.images[0].stage = sg.ShaderStage.Fragment;
1407             desc.images[0].multisampled = false;
1408             desc.images[0].image_type = sg.ImageType._2d;
1409             desc.images[0].sample_type = sg.ImageSampleType.Float;
1410             desc.images[0].hlsl_register_t_n = 0;
1411             desc.samplers[0].stage = sg.ShaderStage.Fragment;
1412             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
1413             desc.samplers[0].hlsl_register_s_n = 0;
1414             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
1415             desc.image_sampler_pairs[0].image_slot = 0;
1416             desc.image_sampler_pairs[0].sampler_slot = 0;
1417             break;
1418         case sg.Backend.Metal_macos:
1419             desc.vertex_func.source = &VS_DEFAULT_SOURCE_METAL_MACOS[0];
1420             desc.vertex_func.entry = "main0";
1421             desc.fragment_func.source = &FS_DEFAULT_SOURCE_METAL_MACOS[0];
1422             desc.fragment_func.entry = "main0";
1423             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1424             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1425             desc.uniform_blocks[0].size = 64;
1426             desc.uniform_blocks[0].msl_buffer_n = 0;
1427             desc.images[0].stage = sg.ShaderStage.Fragment;
1428             desc.images[0].multisampled = false;
1429             desc.images[0].image_type = sg.ImageType._2d;
1430             desc.images[0].sample_type = sg.ImageSampleType.Float;
1431             desc.images[0].msl_texture_n = 0;
1432             desc.samplers[0].stage = sg.ShaderStage.Fragment;
1433             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
1434             desc.samplers[0].msl_sampler_n = 0;
1435             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
1436             desc.image_sampler_pairs[0].image_slot = 0;
1437             desc.image_sampler_pairs[0].sampler_slot = 0;
1438             break;
1439         case sg.Backend.Wgpu:
1440             desc.vertex_func.source = &VS_DEFAULT_SOURCE_WGSL[0];
1441             desc.vertex_func.entry = "main";
1442             desc.fragment_func.source = &FS_DEFAULT_SOURCE_WGSL[0];
1443             desc.fragment_func.entry = "main";
1444             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1445             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1446             desc.uniform_blocks[0].size = 64;
1447             desc.uniform_blocks[0].wgsl_group0_binding_n = 0;
1448             desc.images[0].stage = sg.ShaderStage.Fragment;
1449             desc.images[0].multisampled = false;
1450             desc.images[0].image_type = sg.ImageType._2d;
1451             desc.images[0].sample_type = sg.ImageSampleType.Float;
1452             desc.images[0].wgsl_group1_binding_n = 64;
1453             desc.samplers[0].stage = sg.ShaderStage.Fragment;
1454             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
1455             desc.samplers[0].wgsl_group1_binding_n = 80;
1456             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
1457             desc.image_sampler_pairs[0].image_slot = 0;
1458             desc.image_sampler_pairs[0].sampler_slot = 0;
1459             break;
1460         default: break;
1461     }
1462     return desc;
1463 }
1464 sg.ShaderDesc offscreenShaderDesc(sg.Backend backend) @trusted @nogc nothrow {
1465     sg.ShaderDesc desc;
1466     desc.label = "offscreen_shader";
1467     switch (backend) {
1468         case sg.Backend.Glcore:
1469             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_GLSL410[0];
1470             desc.vertex_func.entry = "main";
1471             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_GLSL410[0];
1472             desc.fragment_func.entry = "main";
1473             desc.attrs[0].glsl_name = "position";
1474             desc.attrs[1].glsl_name = "normal";
1475             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1476             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1477             desc.uniform_blocks[0].size = 64;
1478             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
1479             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
1480             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
1481             break;
1482         case sg.Backend.Gles3:
1483             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_GLSL300ES[0];
1484             desc.vertex_func.entry = "main";
1485             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_GLSL300ES[0];
1486             desc.fragment_func.entry = "main";
1487             desc.attrs[0].glsl_name = "position";
1488             desc.attrs[1].glsl_name = "normal";
1489             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1490             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1491             desc.uniform_blocks[0].size = 64;
1492             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
1493             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
1494             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
1495             break;
1496         case sg.Backend.D3d11:
1497             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_HLSL5[0];
1498             desc.vertex_func.d3d11_target = "vs_5_0";
1499             desc.vertex_func.entry = "main";
1500             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_HLSL5[0];
1501             desc.fragment_func.d3d11_target = "ps_5_0";
1502             desc.fragment_func.entry = "main";
1503             desc.attrs[0].hlsl_sem_name = "TEXCOORD";
1504             desc.attrs[0].hlsl_sem_index = 0;
1505             desc.attrs[1].hlsl_sem_name = "TEXCOORD";
1506             desc.attrs[1].hlsl_sem_index = 1;
1507             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1508             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1509             desc.uniform_blocks[0].size = 64;
1510             desc.uniform_blocks[0].hlsl_register_b_n = 0;
1511             break;
1512         case sg.Backend.Metal_macos:
1513             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_METAL_MACOS[0];
1514             desc.vertex_func.entry = "main0";
1515             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_METAL_MACOS[0];
1516             desc.fragment_func.entry = "main0";
1517             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1518             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1519             desc.uniform_blocks[0].size = 64;
1520             desc.uniform_blocks[0].msl_buffer_n = 0;
1521             break;
1522         case sg.Backend.Wgpu:
1523             desc.vertex_func.source = &VS_OFFSCREEN_SOURCE_WGSL[0];
1524             desc.vertex_func.entry = "main";
1525             desc.fragment_func.source = &FS_OFFSCREEN_SOURCE_WGSL[0];
1526             desc.fragment_func.entry = "main";
1527             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
1528             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
1529             desc.uniform_blocks[0].size = 64;
1530             desc.uniform_blocks[0].wgsl_group0_binding_n = 0;
1531             break;
1532         default: break;
1533     }
1534     return desc;
1535 }