1 module shaders.texcube;
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 examples/shaders/texcube.glsl -o examples/shaders/texcube.d -l glsl410:glsl300es:metal_macos:hlsl5:wgsl -f sokol_d
13 
14     Overview:
15     =========
16     Shader program: 'texcube':
17         Get shader desc: texcubeShaderDesc(sg.queryBackend());
18         Vertex Shader: vs
19         Fragment Shader: fs
20         Attributes:
21             ATTR_TEXCUBE_POS => 0
22             ATTR_TEXCUBE_COLOR0 => 1
23             ATTR_TEXCUBE_TEXCOORD0 => 2
24     Bindings:
25         Uniform block 'vs_params':
26             D struct: VsParams
27             Bind slot: UB_VS_PARAMS => 0
28         Image 'tex':
29             Image type: sg.ImageType._2d
30             Sample type: sg.ImageSampleType.Float
31             Multisampled: false
32             Bind slot: IMG_TEX => 0
33         Sampler 'smp':
34             Type: sg.SamplerType.Filtering
35             Bind slot: SMP_SMP => 0
36 */
37 enum ATTR_TEXCUBE_POS = 0;
38 enum ATTR_TEXCUBE_COLOR0 = 1;
39 enum ATTR_TEXCUBE_TEXCOORD0 = 2;
40 enum UB_VS_PARAMS = 0;
41 enum IMG_TEX = 0;
42 enum SMP_SMP = 0;
43 struct VsParams {
44     align(16) m.Mat4 mvp;
45 }
46 /*
47     #version 410
48 
49     uniform vec4 vs_params[4];
50     layout(location = 0) in vec4 pos;
51     layout(location = 0) out vec4 color;
52     layout(location = 1) in vec4 color0;
53     layout(location = 1) out vec2 uv;
54     layout(location = 2) in vec2 texcoord0;
55 
56     void main()
57     {
58         gl_Position = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * pos;
59         color = color0;
60         uv = texcoord0 * 5.0;
61     }
62 
63 */
64 __gshared char[374] VS_SOURCE_GLSL410 = [
65     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
66     0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,0x5f,0x70,0x61,
67     0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
68     0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
69     0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
70     0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,
71     0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
72     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
73     0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,
74     0x6f,0x72,0x30,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
75     0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,
76     0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,
77     0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,
78     0x65,0x63,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x0a,
79     0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,
80     0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
81     0x6d,0x61,0x74,0x34,0x28,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,
82     0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,
83     0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,
84     0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x70,
85     0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,
86     0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,
87     0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x2a,0x20,0x35,0x2e,0x30,
88     0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
89 ];
90 /*
91     #version 410
92 
93     uniform sampler2D tex_smp;
94 
95     layout(location = 0) out vec4 frag_color;
96     layout(location = 1) in vec2 uv;
97     layout(location = 0) in vec4 color;
98 
99     void main()
100     {
101         frag_color = texture(tex_smp, uv) * color;
102     }
103 
104 */
105 __gshared char[219] FS_SOURCE_GLSL410 = [
106     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
107     0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
108     0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
109     0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,
110     0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
111     0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,
112     0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,
113     0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
114     0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
115     0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,
116     0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
117     0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
118     0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,
119     0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
120 ];
121 /*
122     #version 300 es
123 
124     uniform vec4 vs_params[4];
125     layout(location = 0) in vec4 pos;
126     out vec4 color;
127     layout(location = 1) in vec4 color0;
128     out vec2 uv;
129     layout(location = 2) in vec2 texcoord0;
130 
131     void main()
132     {
133         gl_Position = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * pos;
134         color = color0;
135         uv = texcoord0 * 5.0;
136     }
137 
138 */
139 __gshared char[335] VS_SOURCE_GLSL300ES = [
140     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
141     0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,
142     0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
143     0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,
144     0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x6f,0x75,
145     0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,
146     0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
147     0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,
148     0x30,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,
149     0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
150     0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x74,0x65,0x78,
151     0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,
152     0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,
153     0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,
154     0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,
155     0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,
156     0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
157     0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,
158     0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,
159     0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,
160     0x72,0x64,0x30,0x20,0x2a,0x20,0x35,0x2e,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
161 ];
162 /*
163     #version 300 es
164     precision mediump float;
165     precision highp int;
166 
167     uniform highp sampler2D tex_smp;
168 
169     layout(location = 0) out highp vec4 frag_color;
170     in highp vec2 uv;
171     in highp vec4 color;
172 
173     void main()
174     {
175         frag_color = texture(tex_smp, uv) * color;
176     }
177 
178 */
179 __gshared char[250] FS_SOURCE_GLSL300ES = [
180     0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
181     0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
182     0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
183     0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
184     0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
185     0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,
186     0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
187     0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
188     0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
189     0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,
190     0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
191     0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,
192     0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
193     0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
194     0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,0x63,
195     0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
196 ];
197 /*
198     cbuffer vs_params : register(b0)
199     {
200         row_major float4x4 _19_mvp : packoffset(c0);
201     };
202 
203 
204     static float4 gl_Position;
205     static float4 pos;
206     static float4 color;
207     static float4 color0;
208     static float2 uv;
209     static float2 texcoord0;
210 
211     struct SPIRV_Cross_Input
212     {
213         float4 pos : TEXCOORD0;
214         float4 color0 : TEXCOORD1;
215         float2 texcoord0 : TEXCOORD2;
216     };
217 
218     struct SPIRV_Cross_Output
219     {
220         float4 color : TEXCOORD0;
221         float2 uv : TEXCOORD1;
222         float4 gl_Position : SV_Position;
223     };
224 
225     void vert_main()
226     {
227         gl_Position = mul(pos, _19_mvp);
228         color = color0;
229         uv = texcoord0 * 5.0f;
230     }
231 
232     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
233     {
234         pos = stage_input.pos;
235         color0 = stage_input.color0;
236         texcoord0 = stage_input.texcoord0;
237         vert_main();
238         SPIRV_Cross_Output stage_output;
239         stage_output.gl_Position = gl_Position;
240         stage_output.color = color;
241         stage_output.uv = uv;
242         return stage_output;
243     }
244 */
245 __gshared char[919] VS_SOURCE_HLSL5 = [
246     0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
247     0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x62,0x30,0x29,
248     0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72,
249     0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,
250     0x70,0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,
251     0x30,0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,
252     0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
253     0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,
254     0x34,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,
255     0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x73,0x74,0x61,0x74,
256     0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,
257     0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
258     0x75,0x76,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,
259     0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x0a,0x73,0x74,
260     0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,
261     0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
262     0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,
263     0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
264     0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,
265     0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,
266     0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,
267     0x4f,0x52,0x44,0x32,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
268     0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,
269     0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
270     0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,
271     0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,
272     0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20,
273     0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,
274     0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,
275     0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x76,0x65,
276     0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
277     0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x75,
278     0x6c,0x28,0x70,0x6f,0x73,0x2c,0x20,0x5f,0x31,0x39,0x5f,0x6d,0x76,0x70,0x29,0x3b,
279     0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,
280     0x6f,0x72,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,
281     0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x2a,0x20,0x35,0x2e,0x30,0x66,0x3b,0x0a,
282     0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,
283     0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,
284     0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,
285     0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
286     0x70,0x6f,0x73,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,
287     0x74,0x2e,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,
288     0x30,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,
289     0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x74,0x65,0x78,0x63,
290     0x6f,0x6f,0x72,0x64,0x30,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,
291     0x70,0x75,0x74,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,
292     0x20,0x20,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,
293     0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,
294     0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,
295     0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,
296     0x75,0x74,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
297     0x6e,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,
298     0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,
299     0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
300     0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,
301     0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,
302     0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,
303     0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
304 ];
305 /*
306     Texture2D<float4> tex : register(t0);
307     SamplerState smp : register(s0);
308 
309     static float4 frag_color;
310     static float2 uv;
311     static float4 color;
312 
313     struct SPIRV_Cross_Input
314     {
315         float4 color : TEXCOORD0;
316         float2 uv : TEXCOORD1;
317     };
318 
319     struct SPIRV_Cross_Output
320     {
321         float4 frag_color : SV_Target0;
322     };
323 
324     void frag_main()
325     {
326         frag_color = tex.Sample(smp, uv) * color;
327     }
328 
329     SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
330     {
331         uv = stage_input.uv;
332         color = stage_input.color;
333         frag_main();
334         SPIRV_Cross_Output stage_output;
335         stage_output.frag_color = frag_color;
336         return stage_output;
337     }
338 */
339 __gshared char[599] FS_SOURCE_HLSL5 = [
340     0x54,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x44,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x34,
341     0x3e,0x20,0x74,0x65,0x78,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,
342     0x28,0x74,0x30,0x29,0x3b,0x0a,0x53,0x61,0x6d,0x70,0x6c,0x65,0x72,0x53,0x74,0x61,
343     0x74,0x65,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,
344     0x72,0x28,0x73,0x30,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,
345     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
346     0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
347     0x75,0x76,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,
348     0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
349     0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,
350     0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
351     0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,
352     0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,
353     0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x7d,0x3b,
354     0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,
355     0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,
356     0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
357     0x6c,0x6f,0x72,0x20,0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72,0x67,0x65,0x74,0x30,
358     0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x66,0x72,0x61,0x67,0x5f,
359     0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,
360     0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x2e,0x53,0x61,
361     0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,
362     0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,
363     0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,
364     0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,
365     0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,
366     0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,
367     0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,
368     0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,
369     0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
370     0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
371     0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,
372     0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,
373     0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,
374     0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,
375     0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,
376     0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,
377     0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
378 ];
379 /*
380     #include <metal_stdlib>
381     #include <simd/simd.h>
382 
383     using namespace metal;
384 
385     struct vs_params
386     {
387         float4x4 mvp;
388     };
389 
390     struct main0_out
391     {
392         float4 color [[user(locn0)]];
393         float2 uv [[user(locn1)]];
394         float4 gl_Position [[position]];
395     };
396 
397     struct main0_in
398     {
399         float4 pos [[attribute(0)]];
400         float4 color0 [[attribute(1)]];
401         float2 texcoord0 [[attribute(2)]];
402     };
403 
404     vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _19 [[buffer(0)]])
405     {
406         main0_out out = {};
407         out.gl_Position = _19.mvp * in.pos;
408         out.color = in.color0;
409         out.uv = in.texcoord0 * 5.0;
410         return out;
411     }
412 
413 */
414 __gshared char[602] VS_SOURCE_METAL_MACOS = [
415     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
416     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
417     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
418     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
419     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76,
420     0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
421     0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,0x76,0x70,0x3b,0x0a,0x7d,0x3b,0x0a,
422     0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
423     0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,
424     0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
425     0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
426     0x20,0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,
427     0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
428     0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,
429     0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,
430     0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,
431     0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x20,0x5b,
432     0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,
433     0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,
434     0x72,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,
435     0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
436     0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,
437     0x69,0x62,0x75,0x74,0x65,0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
438     0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,
439     0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,
440     0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,
441     0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,
442     0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,
443     0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,
444     0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,
445     0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,
446     0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x39,0x2e,0x6d,0x76,0x70,0x20,
447     0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,
448     0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,
449     0x6f,0x72,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x75,0x76,0x20,
450     0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x2a,
451     0x20,0x35,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
452     0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
453 ];
454 /*
455     #include <metal_stdlib>
456     #include <simd/simd.h>
457 
458     using namespace metal;
459 
460     struct main0_out
461     {
462         float4 frag_color [[color(0)]];
463     };
464 
465     struct main0_in
466     {
467         float4 color [[user(locn0)]];
468         float2 uv [[user(locn1)]];
469     };
470 
471     fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex [[texture(0)]], sampler smp [[sampler(0)]])
472     {
473         main0_out out = {};
474         out.frag_color = tex.sample(smp, in.uv) * in.color;
475         return out;
476     }
477 
478 */
479 __gshared char[436] FS_SOURCE_METAL_MACOS = [
480     0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
481     0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
482     0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
483     0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
484     0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
485     0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
486     0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
487     0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
488     0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
489     0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
490     0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,
491     0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
492     0x32,0x20,0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
493     0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,
494     0x6e,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,
495     0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,
496     0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,
497     0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65,
498     0x78,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,
499     0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x6d,0x70,0x20,0x5b,0x5b,
500     0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,
501     0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,
502     0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
503     0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,
504     0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x69,0x6e,0x2e,
505     0x75,0x76,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
506     0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,
507     0x7d,0x0a,0x0a,0x00,
508 ];
509 /*
510     diagnostic(off, derivative_uniformity);
511 
512     struct vs_params {
513       /_ @offset(0) _/
514       mvp : mat4x4f,
515     }
516 
517     @binding(0) @group(0) var<uniform> x_19 : vs_params;
518 
519     var<private> pos : vec4f;
520 
521     var<private> color : vec4f;
522 
523     var<private> color0 : vec4f;
524 
525     var<private> uv : vec2f;
526 
527     var<private> texcoord0 : vec2f;
528 
529     var<private> gl_Position : vec4f;
530 
531     fn main_1() {
532       gl_Position = (x_19.mvp * pos);
533       color = color0;
534       uv = (texcoord0 * 5.0f);
535       return;
536     }
537 
538     struct main_out {
539       @builtin(position)
540       gl_Position : vec4f,
541       @location(0)
542       color_1 : vec4f,
543       @location(1)
544       uv_1 : vec2f,
545     }
546 
547     @vertex
548     fn main(@location(0) pos_param : vec4f, @location(1) color0_param : vec4f, @location(2) texcoord0_param : vec2f) -> main_out {
549       pos = pos_param;
550       color0 = color0_param;
551       texcoord0 = texcoord0_param;
552       main_1();
553       return main_out(gl_Position, color, uv);
554     }
555 */
556 __gshared char[837] VS_SOURCE_WGSL = [
557     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
558     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
559     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
560     0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x7b,0x0a,0x20,0x20,0x2f,0x2a,
561     0x20,0x40,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x30,0x29,0x20,0x2a,0x2f,0x0a,0x20,
562     0x20,0x6d,0x76,0x70,0x20,0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x2c,0x0a,
563     0x7d,0x0a,0x0a,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x30,0x29,0x20,0x40,
564     0x67,0x72,0x6f,0x75,0x70,0x28,0x30,0x29,0x20,0x76,0x61,0x72,0x3c,0x75,0x6e,0x69,
565     0x66,0x6f,0x72,0x6d,0x3e,0x20,0x78,0x5f,0x31,0x39,0x20,0x3a,0x20,0x76,0x73,0x5f,
566     0x70,0x61,0x72,0x61,0x6d,0x73,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
567     0x76,0x61,0x74,0x65,0x3e,0x20,0x70,0x6f,0x73,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,
568     0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,
569     0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,
570     0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x63,0x6f,
571     0x6c,0x6f,0x72,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,
572     0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,
573     0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
574     0x76,0x61,0x74,0x65,0x3e,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,
575     0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,
576     0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
577     0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,
578     0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x67,0x6c,0x5f,
579     0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x78,0x5f,0x31,0x39,
580     0x2e,0x6d,0x76,0x70,0x20,0x2a,0x20,0x70,0x6f,0x73,0x29,0x3b,0x0a,0x20,0x20,0x63,
581     0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x20,
582     0x20,0x75,0x76,0x20,0x3d,0x20,0x28,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,
583     0x20,0x2a,0x20,0x35,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,
584     0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,
585     0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x62,0x75,0x69,0x6c,
586     0x74,0x69,0x6e,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,
587     0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,
588     0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
589     0x28,0x30,0x29,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,
590     0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,
591     0x6f,0x6e,0x28,0x31,0x29,0x0a,0x20,0x20,0x75,0x76,0x5f,0x31,0x20,0x3a,0x20,0x76,
592     0x65,0x63,0x32,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x76,0x65,0x72,0x74,0x65,0x78,
593     0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,
594     0x6f,0x6e,0x28,0x30,0x29,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,
595     0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,
596     0x6f,0x6e,0x28,0x31,0x29,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x5f,0x70,0x61,0x72,
597     0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,
598     0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,
599     0x64,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,
600     0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,
601     0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,
602     0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3d,0x20,0x63,0x6f,
603     0x6c,0x6f,0x72,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x74,0x65,
604     0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,
605     0x72,0x64,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,
606     0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
607     0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
608     0x74,0x69,0x6f,0x6e,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x75,0x76,0x29,
609     0x3b,0x0a,0x7d,0x0a,0x00,
610 ];
611 /*
612     diagnostic(off, derivative_uniformity);
613 
614     var<private> frag_color : vec4f;
615 
616     @binding(64) @group(1) var tex : texture_2d<f32>;
617 
618     @binding(80) @group(1) var smp : sampler;
619 
620     var<private> uv : vec2f;
621 
622     var<private> color : vec4f;
623 
624     fn main_1() {
625       let x_23 = uv;
626       let x_24 = textureSample(tex, smp, x_23);
627       frag_color = (x_24 * color);
628       return;
629     }
630 
631     struct main_out {
632       @location(0)
633       frag_color_1 : vec4f,
634     }
635 
636     @fragment
637     fn main(@location(1) uv_param : vec2f, @location(0) color_param : vec4f) -> main_out {
638       uv = uv_param;
639       color = color_param;
640       main_1();
641       return main_out(frag_color);
642     }
643 */
644 __gshared char[586] FS_SOURCE_WGSL = [
645     0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
646     0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
647     0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
648     0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
649     0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x40,0x62,0x69,0x6e,0x64,
650     0x69,0x6e,0x67,0x28,0x36,0x34,0x29,0x20,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x31,
651     0x29,0x20,0x76,0x61,0x72,0x20,0x74,0x65,0x78,0x20,0x3a,0x20,0x74,0x65,0x78,0x74,
652     0x75,0x72,0x65,0x5f,0x32,0x64,0x3c,0x66,0x33,0x32,0x3e,0x3b,0x0a,0x0a,0x40,0x62,
653     0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x38,0x30,0x29,0x20,0x40,0x67,0x72,0x6f,0x75,
654     0x70,0x28,0x31,0x29,0x20,0x76,0x61,0x72,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x73,
655     0x61,0x6d,0x70,0x6c,0x65,0x72,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
656     0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,
657     0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,
658     0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,
659     0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,
660     0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,
661     0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x34,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,
662     0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x2c,0x20,0x73,
663     0x6d,0x70,0x2c,0x20,0x78,0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,
664     0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x28,0x78,0x5f,0x32,0x34,0x20,
665     0x2a,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,
666     0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,
667     0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,
668     0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
669     0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,
670     0x7d,0x0a,0x0a,0x40,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,
671     0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,
672     0x29,0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,
673     0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,
674     0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,
675     0x65,0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,
676     0x74,0x20,0x7b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f,0x70,0x61,
677     0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,
678     0x6f,0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,
679     0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
680     0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,
681     0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x00,
682 ];
683 sg.ShaderDesc texcubeShaderDesc(sg.Backend backend) @trusted @nogc nothrow {
684     sg.ShaderDesc desc;
685     desc.label = "texcube_shader";
686     switch (backend) {
687         case sg.Backend.Glcore:
688             desc.vertex_func.source = &VS_SOURCE_GLSL410[0];
689             desc.vertex_func.entry = "main";
690             desc.fragment_func.source = &FS_SOURCE_GLSL410[0];
691             desc.fragment_func.entry = "main";
692             desc.attrs[0].base_type = sg.ShaderAttrBaseType.Float;
693             desc.attrs[0].glsl_name = "pos";
694             desc.attrs[1].base_type = sg.ShaderAttrBaseType.Float;
695             desc.attrs[1].glsl_name = "color0";
696             desc.attrs[2].base_type = sg.ShaderAttrBaseType.Float;
697             desc.attrs[2].glsl_name = "texcoord0";
698             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
699             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
700             desc.uniform_blocks[0].size = 64;
701             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
702             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
703             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
704             desc.images[0].stage = sg.ShaderStage.Fragment;
705             desc.images[0].multisampled = false;
706             desc.images[0].image_type = sg.ImageType._2d;
707             desc.images[0].sample_type = sg.ImageSampleType.Float;
708             desc.samplers[0].stage = sg.ShaderStage.Fragment;
709             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
710             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
711             desc.image_sampler_pairs[0].image_slot = 0;
712             desc.image_sampler_pairs[0].sampler_slot = 0;
713             desc.image_sampler_pairs[0].glsl_name = "tex_smp";
714             break;
715         case sg.Backend.Gles3:
716             desc.vertex_func.source = &VS_SOURCE_GLSL300ES[0];
717             desc.vertex_func.entry = "main";
718             desc.fragment_func.source = &FS_SOURCE_GLSL300ES[0];
719             desc.fragment_func.entry = "main";
720             desc.attrs[0].base_type = sg.ShaderAttrBaseType.Float;
721             desc.attrs[0].glsl_name = "pos";
722             desc.attrs[1].base_type = sg.ShaderAttrBaseType.Float;
723             desc.attrs[1].glsl_name = "color0";
724             desc.attrs[2].base_type = sg.ShaderAttrBaseType.Float;
725             desc.attrs[2].glsl_name = "texcoord0";
726             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
727             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
728             desc.uniform_blocks[0].size = 64;
729             desc.uniform_blocks[0].glsl_uniforms[0].type = sg.UniformType.Float4;
730             desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
731             desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
732             desc.images[0].stage = sg.ShaderStage.Fragment;
733             desc.images[0].multisampled = false;
734             desc.images[0].image_type = sg.ImageType._2d;
735             desc.images[0].sample_type = sg.ImageSampleType.Float;
736             desc.samplers[0].stage = sg.ShaderStage.Fragment;
737             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
738             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
739             desc.image_sampler_pairs[0].image_slot = 0;
740             desc.image_sampler_pairs[0].sampler_slot = 0;
741             desc.image_sampler_pairs[0].glsl_name = "tex_smp";
742             break;
743         case sg.Backend.D3d11:
744             desc.vertex_func.source = &VS_SOURCE_HLSL5[0];
745             desc.vertex_func.d3d11_target = "vs_5_0";
746             desc.vertex_func.entry = "main";
747             desc.fragment_func.source = &FS_SOURCE_HLSL5[0];
748             desc.fragment_func.d3d11_target = "ps_5_0";
749             desc.fragment_func.entry = "main";
750             desc.attrs[0].base_type = sg.ShaderAttrBaseType.Float;
751             desc.attrs[0].hlsl_sem_name = "TEXCOORD";
752             desc.attrs[0].hlsl_sem_index = 0;
753             desc.attrs[1].base_type = sg.ShaderAttrBaseType.Float;
754             desc.attrs[1].hlsl_sem_name = "TEXCOORD";
755             desc.attrs[1].hlsl_sem_index = 1;
756             desc.attrs[2].base_type = sg.ShaderAttrBaseType.Float;
757             desc.attrs[2].hlsl_sem_name = "TEXCOORD";
758             desc.attrs[2].hlsl_sem_index = 2;
759             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
760             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
761             desc.uniform_blocks[0].size = 64;
762             desc.uniform_blocks[0].hlsl_register_b_n = 0;
763             desc.images[0].stage = sg.ShaderStage.Fragment;
764             desc.images[0].multisampled = false;
765             desc.images[0].image_type = sg.ImageType._2d;
766             desc.images[0].sample_type = sg.ImageSampleType.Float;
767             desc.images[0].hlsl_register_t_n = 0;
768             desc.samplers[0].stage = sg.ShaderStage.Fragment;
769             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
770             desc.samplers[0].hlsl_register_s_n = 0;
771             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
772             desc.image_sampler_pairs[0].image_slot = 0;
773             desc.image_sampler_pairs[0].sampler_slot = 0;
774             break;
775         case sg.Backend.Metal_macos:
776             desc.vertex_func.source = &VS_SOURCE_METAL_MACOS[0];
777             desc.vertex_func.entry = "main0";
778             desc.fragment_func.source = &FS_SOURCE_METAL_MACOS[0];
779             desc.fragment_func.entry = "main0";
780             desc.attrs[0].base_type = sg.ShaderAttrBaseType.Float;
781             desc.attrs[1].base_type = sg.ShaderAttrBaseType.Float;
782             desc.attrs[2].base_type = sg.ShaderAttrBaseType.Float;
783             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
784             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
785             desc.uniform_blocks[0].size = 64;
786             desc.uniform_blocks[0].msl_buffer_n = 0;
787             desc.images[0].stage = sg.ShaderStage.Fragment;
788             desc.images[0].multisampled = false;
789             desc.images[0].image_type = sg.ImageType._2d;
790             desc.images[0].sample_type = sg.ImageSampleType.Float;
791             desc.images[0].msl_texture_n = 0;
792             desc.samplers[0].stage = sg.ShaderStage.Fragment;
793             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
794             desc.samplers[0].msl_sampler_n = 0;
795             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
796             desc.image_sampler_pairs[0].image_slot = 0;
797             desc.image_sampler_pairs[0].sampler_slot = 0;
798             break;
799         case sg.Backend.Wgpu:
800             desc.vertex_func.source = &VS_SOURCE_WGSL[0];
801             desc.vertex_func.entry = "main";
802             desc.fragment_func.source = &FS_SOURCE_WGSL[0];
803             desc.fragment_func.entry = "main";
804             desc.attrs[0].base_type = sg.ShaderAttrBaseType.Float;
805             desc.attrs[1].base_type = sg.ShaderAttrBaseType.Float;
806             desc.attrs[2].base_type = sg.ShaderAttrBaseType.Float;
807             desc.uniform_blocks[0].stage = sg.ShaderStage.Vertex;
808             desc.uniform_blocks[0].layout = sg.UniformLayout.Std140;
809             desc.uniform_blocks[0].size = 64;
810             desc.uniform_blocks[0].wgsl_group0_binding_n = 0;
811             desc.images[0].stage = sg.ShaderStage.Fragment;
812             desc.images[0].multisampled = false;
813             desc.images[0].image_type = sg.ImageType._2d;
814             desc.images[0].sample_type = sg.ImageSampleType.Float;
815             desc.images[0].wgsl_group1_binding_n = 64;
816             desc.samplers[0].stage = sg.ShaderStage.Fragment;
817             desc.samplers[0].sampler_type = sg.SamplerType.Filtering;
818             desc.samplers[0].wgsl_group1_binding_n = 80;
819             desc.image_sampler_pairs[0].stage = sg.ShaderStage.Fragment;
820             desc.image_sampler_pairs[0].image_slot = 0;
821             desc.image_sampler_pairs[0].sampler_slot = 0;
822             break;
823         default: break;
824     }
825     return desc;
826 }