]> git.tdb.fi Git - libs/gl.git/blob - builtin_data/_builtin.glsl
Check the flat qualifier from the correct member
[libs/gl.git] / builtin_data / _builtin.glsl
1 typedef vector(2) float vec2;
2 typedef vector(3) float vec3;
3 typedef vector(4) float vec4;
4 typedef vector(2) vec2 mat2;
5 typedef mat2 mat2x2;
6 typedef vector(3) vec2 mat3x2;
7 typedef vector(4) vec2 mat4x2;
8 typedef vector(2) vec3 mat2x3;
9 typedef vector(3) vec3 mat3;
10 typedef mat3 mat3x3;
11 typedef vector(4) vec3 mat4x3;
12 typedef vector(2) vec4 mat2x4;
13 typedef vector(3) vec4 mat3x4;
14 typedef vector(4) vec4 mat4;
15 typedef mat4 mat4x4;
16
17 typedef vector(2) int ivec2;
18 typedef vector(3) int ivec3;
19 typedef vector(4) int ivec4;
20
21 typedef vector(2) bool bvec2;
22 typedef vector(3) bool bvec3;
23 typedef vector(4) bool bvec4;
24
25 typedef image(dimensions=1, sampled) float sampler1D;
26 typedef image(dimensions=2, sampled) float sampler2D;
27 typedef image(dimensions=3, sampled) float sampler3D;
28 typedef image(dimensions=cube, sampled) float samplerCube;
29 typedef image(dimensions=1[], sampled) float sampler1DArray;
30 typedef image(dimensions=2[], sampled) float sampler2DArray;
31 typedef image(dimensions=cube[], sampled) float samplerCubeArray;
32 typedef image(dimensions=1, shadow, sampled) float sampler1DShadow;
33 typedef image(dimensions=2, shadow, sampled) float sampler2DShadow;
34 typedef image(dimensions=1[], shadow, sampled) float sampler1DArrayShadow;
35 typedef image(dimensions=2[], shadow, sampled) float sampler2DArrayShadow;
36 typedef image(dimensions=cube, shadow, sampled) float samplerCubeShadow;
37 typedef image(dimensions=cube[], shadow, sampled) float samplerCubeArrayShadow;
38
39 // BEGIN BUILTIN FUNCTIONS
40 float radians(float degrees);
41 vec2 radians(vec2 degrees);
42 vec3 radians(vec3 degrees);
43 vec4 radians(vec4 degrees);
44 float degrees(float radians);
45 vec2 degrees(vec2 radians);
46 vec3 degrees(vec3 radians);
47 vec4 degrees(vec4 radians);
48 float sin(float angle);
49 vec2 sin(vec2 angle);
50 vec3 sin(vec3 angle);
51 vec4 sin(vec4 angle);
52 float cos(float angle);
53 vec2 cos(vec2 angle);
54 vec3 cos(vec3 angle);
55 vec4 cos(vec4 angle);
56 float tan(float angle);
57 vec2 tan(vec2 angle);
58 vec3 tan(vec3 angle);
59 vec4 tan(vec4 angle);
60 float asin(float x);
61 vec2 asin(vec2 x);
62 vec3 asin(vec3 x);
63 vec4 asin(vec4 x);
64 float acos(float x);
65 vec2 acos(vec2 x);
66 vec3 acos(vec3 x);
67 vec4 acos(vec4 x);
68 float atan(float y, float x);
69 vec2 atan(vec2 y, vec2 x);
70 vec3 atan(vec3 y, vec3 x);
71 vec4 atan(vec4 y, vec4 x);
72 float atan(float y_over_x);
73 vec2 atan(vec2 y_over_x);
74 vec3 atan(vec3 y_over_x);
75 vec4 atan(vec4 y_over_x);
76 float sinh(float angle);
77 vec2 sinh(vec2 angle);
78 vec3 sinh(vec3 angle);
79 vec4 sinh(vec4 angle);
80 float cosh(float angle);
81 vec2 cosh(vec2 angle);
82 vec3 cosh(vec3 angle);
83 vec4 cosh(vec4 angle);
84 float tanh(float angle);
85 vec2 tanh(vec2 angle);
86 vec3 tanh(vec3 angle);
87 vec4 tanh(vec4 angle);
88 float asinh(float x);
89 vec2 asinh(vec2 x);
90 vec3 asinh(vec3 x);
91 vec4 asinh(vec4 x);
92 float acosh(float x);
93 vec2 acosh(vec2 x);
94 vec3 acosh(vec3 x);
95 vec4 acosh(vec4 x);
96 float atanh(float x);
97 vec2 atanh(vec2 x);
98 vec3 atanh(vec3 x);
99 vec4 atanh(vec4 x);
100 float pow(float x, float y);
101 vec2 pow(vec2 x, vec2 y);
102 vec3 pow(vec3 x, vec3 y);
103 vec4 pow(vec4 x, vec4 y);
104 float exp(float x);
105 vec2 exp(vec2 x);
106 vec3 exp(vec3 x);
107 vec4 exp(vec4 x);
108 float log(float x);
109 vec2 log(vec2 x);
110 vec3 log(vec3 x);
111 vec4 log(vec4 x);
112 float exp2(float x);
113 vec2 exp2(vec2 x);
114 vec3 exp2(vec3 x);
115 vec4 exp2(vec4 x);
116 float log2(float x);
117 vec2 log2(vec2 x);
118 vec3 log2(vec3 x);
119 vec4 log2(vec4 x);
120 float sqrt(float x);
121 vec2 sqrt(vec2 x);
122 vec3 sqrt(vec3 x);
123 vec4 sqrt(vec4 x);
124 float inversesqrt(float x);
125 vec2 inversesqrt(vec2 x);
126 vec3 inversesqrt(vec3 x);
127 vec4 inversesqrt(vec4 x);
128 float abs(float x);
129 vec2 abs(vec2 x);
130 vec3 abs(vec3 x);
131 vec4 abs(vec4 x);
132 int abs(int x);
133 ivec2 abs(ivec2 x);
134 ivec3 abs(ivec3 x);
135 ivec4 abs(ivec4 x);
136 float sign(float x);
137 vec2 sign(vec2 x);
138 vec3 sign(vec3 x);
139 vec4 sign(vec4 x);
140 int sign(int x);
141 ivec2 sign(ivec2 x);
142 ivec3 sign(ivec3 x);
143 ivec4 sign(ivec4 x);
144 float floor(float x);
145 vec2 floor(vec2 x);
146 vec3 floor(vec3 x);
147 vec4 floor(vec4 x);
148 float trunc(float x);
149 vec2 trunc(vec2 x);
150 vec3 trunc(vec3 x);
151 vec4 trunc(vec4 x);
152 float round(float x);
153 vec2 round(vec2 x);
154 vec3 round(vec3 x);
155 vec4 round(vec4 x);
156 float roundEven(float x);
157 vec2 roundEven(vec2 x);
158 vec3 roundEven(vec3 x);
159 vec4 roundEven(vec4 x);
160 float ceil(float x);
161 vec2 ceil(vec2 x);
162 vec3 ceil(vec3 x);
163 vec4 ceil(vec4 x);
164 float fract(float x);
165 vec2 fract(vec2 x);
166 vec3 fract(vec3 x);
167 vec4 fract(vec4 x);
168 float mod(float x, float y);
169 vec2 mod(vec2 x, vec2 y);
170 vec3 mod(vec3 x, vec3 y);
171 vec4 mod(vec4 x, vec4 y);
172 vec2 mod(vec2 x, float y);
173 vec3 mod(vec3 x, float y);
174 vec4 mod(vec4 x, float y);
175 float modf(float x, out float y);
176 vec2 modf(vec2 x, out vec2 y);
177 vec3 modf(vec3 x, out vec3 y);
178 vec4 modf(vec4 x, out vec4 y);
179 float min(float x, float y);
180 vec2 min(vec2 x, vec2 y);
181 vec3 min(vec3 x, vec3 y);
182 vec4 min(vec4 x, vec4 y);
183 int min(int x, int y);
184 ivec2 min(ivec2 x, ivec2 y);
185 ivec3 min(ivec3 x, ivec3 y);
186 ivec4 min(ivec4 x, ivec4 y);
187 vec2 min(vec2 x, float y);
188 vec3 min(vec3 x, float y);
189 vec4 min(vec4 x, float y);
190 ivec2 min(ivec2 x, int y);
191 ivec3 min(ivec3 x, int y);
192 ivec4 min(ivec4 x, int y);
193 float max(float x, float y);
194 vec2 max(vec2 x, vec2 y);
195 vec3 max(vec3 x, vec3 y);
196 vec4 max(vec4 x, vec4 y);
197 int max(int x, int y);
198 ivec2 max(ivec2 x, ivec2 y);
199 ivec3 max(ivec3 x, ivec3 y);
200 ivec4 max(ivec4 x, ivec4 y);
201 vec2 max(vec2 x, float y);
202 vec3 max(vec3 x, float y);
203 vec4 max(vec4 x, float y);
204 ivec2 max(ivec2 x, int y);
205 ivec3 max(ivec3 x, int y);
206 ivec4 max(ivec4 x, int y);
207 float clamp(float x, float minVal, float maxVal);
208 vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);
209 vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);
210 vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);
211 int clamp(int x, int minVal, int maxVal);
212 ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);
213 ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);
214 ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);
215 vec2 clamp(vec2 x, float minVal, float maxVal);
216 vec3 clamp(vec3 x, float minVal, float maxVal);
217 vec4 clamp(vec4 x, float minVal, float maxVal);
218 ivec2 clamp(ivec2 x, int minVal, int maxVal);
219 ivec3 clamp(ivec3 x, int minVal, int maxVal);
220 ivec4 clamp(ivec4 x, int minVal, int maxVal);
221 float mix(float x, float y, float a);
222 vec2 mix(vec2 x, vec2 y, vec2 a);
223 vec3 mix(vec3 x, vec3 y, vec3 a);
224 vec4 mix(vec4 x, vec4 y, vec4 a);
225 vec2 mix(vec2 x, vec2 y, float a);
226 vec3 mix(vec3 x, vec3 y, float a);
227 vec4 mix(vec4 x, vec4 y, float a);
228 float mix(float x, float y, bool a);
229 vec2 mix(vec2 x, vec2 y, bvec2 a);
230 vec3 mix(vec3 x, vec3 y, bvec3 a);
231 vec4 mix(vec4 x, vec4 y, bvec4 a);
232 int mix(int x, int y, bool a);
233 ivec2 mix(ivec2 x, ivec2 y, bvec2 a);
234 ivec3 mix(ivec3 x, ivec3 y, bvec3 a);
235 ivec4 mix(ivec4 x, ivec4 y, bvec4 a);
236 float step(float edge, float x);
237 vec2 step(vec2 edge, vec2 x);
238 vec3 step(vec3 edge, vec3 x);
239 vec4 step(vec4 edge, vec4 x);
240 vec2 step(float edge, vec2 x);
241 vec3 step(float edge, vec3 x);
242 vec4 step(float edge, vec4 x);
243 float smoothstep(float edge0, float edge1, float x);
244 vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);
245 vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);
246 vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);
247 vec2 smoothstep(float edge0, float edge1, vec2 x);
248 vec3 smoothstep(float edge0, float edge1, vec3 x);
249 vec4 smoothstep(float edge0, float edge1, vec4 x);
250 bool isnan(float x);
251 bvec2 isnan(vec2 x);
252 bvec3 isnan(vec3 x);
253 bvec4 isnan(vec4 x);
254 bool isinf(float x);
255 bvec2 isinf(vec2 x);
256 bvec3 isinf(vec3 x);
257 bvec4 isinf(vec4 x);
258 int floatBitsToInt(float value);
259 ivec2 floatBitsToInt(vec2 value);
260 ivec3 floatBitsToInt(vec3 value);
261 ivec4 floatBitsToInt(vec4 value);
262 float intBitsToFloat(int value);
263 vec2 intBitsToFloat(ivec2 value);
264 vec3 intBitsToFloat(ivec3 value);
265 vec4 intBitsToFloat(ivec4 value);
266 float fma(float a, float b, float c);
267 vec2 fma(vec2 a, vec2 b, vec2 c);
268 vec3 fma(vec3 a, vec3 b, vec3 c);
269 vec4 fma(vec4 a, vec4 b, vec4 c);
270 float frexp(float x, out int exp);
271 vec2 frexp(vec2 x, out ivec2 exp);
272 vec3 frexp(vec3 x, out ivec3 exp);
273 vec4 frexp(vec4 x, out ivec4 exp);
274 float ldexp(float x, int exp);
275 vec2 ldexp(vec2 x, ivec2 exp);
276 vec3 ldexp(vec3 x, ivec3 exp);
277 vec4 ldexp(vec4 x, ivec4 exp);
278 float length(float x);
279 float length(vec2 x);
280 float length(vec3 x);
281 float length(vec4 x);
282 float distance(float p0, float p1);
283 float distance(vec2 p0, vec2 p1);
284 float distance(vec3 p0, vec3 p1);
285 float distance(vec4 p0, vec4 p1);
286 float dot(float x, float y);
287 float dot(vec2 x, vec2 y);
288 float dot(vec3 x, vec3 y);
289 float dot(vec4 x, vec4 y);
290 vec3 cross(vec3 x);
291 float normalize(float x);
292 vec2 normalize(vec2 x);
293 vec3 normalize(vec3 x);
294 vec4 normalize(vec4 x);
295 float faceforward(float N, float I, float Nref);
296 vec2 faceforward(vec2 N, vec2 I, vec2 Nref);
297 vec3 faceforward(vec3 N, vec3 I, vec3 Nref);
298 vec4 faceforward(vec4 N, vec4 I, vec4 Nref);
299 float reflect(float N, float I);
300 vec2 reflect(vec2 N, vec2 I);
301 vec3 reflect(vec3 N, vec3 I);
302 vec4 reflect(vec4 N, vec4 I);
303 float refract(float N, float I, float eta);
304 vec2 refract(vec2 N, vec2 I, float eta);
305 vec3 refract(vec3 N, vec3 I, float eta);
306 vec4 refract(vec4 N, vec4 I, float eta);
307 mat2 matrixCompMult(mat2 x, mat2 y);
308 mat3 matrixCompMult(mat3 x, mat3 y);
309 mat4 matrixCompMult(mat4 x, mat4 y);
310 mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
311 mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
312 mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
313 mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
314 mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
315 mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
316 mat2 outerProduct(vec2 c, vec2 r);
317 mat3 outerProduct(vec3 c, vec3 r);
318 mat4 outerProduct(vec4 c, vec4 r);
319 mat2x3 outerProduct(vec3 c, vec2 r);
320 mat3x2 outerProduct(vec2 c, vec3 r);
321 mat2x4 outerProduct(vec4 c, vec2 r);
322 mat4x2 outerProduct(vec2 c, vec4 r);
323 mat3x4 outerProduct(vec4 c, vec3 r);
324 mat4x3 outerProduct(vec3 c, vec4 r);
325 mat2 transpose(mat2 m);
326 mat3 transpose(mat3 m);
327 mat4 transpose(mat4 m);
328 mat3x2 transpose(mat2x3 m);
329 mat2x3 transpose(mat3x2 m);
330 mat4x2 transpose(mat2x4 m);
331 mat2x4 transpose(mat4x2 m);
332 mat4x3 transpose(mat3x4 m);
333 mat3x4 transpose(mat4x3 m);
334 mat2 determinant(mat2 m);
335 mat3 determinant(mat3 m);
336 mat4 determinant(mat4 m);
337 mat2 inverse(mat2 m);
338 mat3 inverse(mat3 m);
339 mat4 inverse(mat4 m);
340 bvec2 lessThan(vec2 x, vec2 y);
341 bvec3 lessThan(vec3 x, vec3 y);
342 bvec4 lessThan(vec4 x, vec4 y);
343 bvec2 lessThan(ivec2 x, ivec2 y);
344 bvec3 lessThan(ivec3 x, ivec3 y);
345 bvec4 lessThan(ivec4 x, ivec4 y);
346 bvec2 lessThanEqual(vec2 x, vec2 y);
347 bvec3 lessThanEqual(vec3 x, vec3 y);
348 bvec4 lessThanEqual(vec4 x, vec4 y);
349 bvec2 lessThanEqual(ivec2 x, ivec2 y);
350 bvec3 lessThanEqual(ivec3 x, ivec3 y);
351 bvec4 lessThanEqual(ivec4 x, ivec4 y);
352 bvec2 greaterThan(vec2 x, vec2 y);
353 bvec3 greaterThan(vec3 x, vec3 y);
354 bvec4 greaterThan(vec4 x, vec4 y);
355 bvec2 greaterThan(ivec2 x, ivec2 y);
356 bvec3 greaterThan(ivec3 x, ivec3 y);
357 bvec4 greaterThan(ivec4 x, ivec4 y);
358 bvec2 greaterThanEqual(vec2 x, vec2 y);
359 bvec3 greaterThanEqual(vec3 x, vec3 y);
360 bvec4 greaterThanEqual(vec4 x, vec4 y);
361 bvec2 greaterThanEqual(ivec2 x, ivec2 y);
362 bvec3 greaterThanEqual(ivec3 x, ivec3 y);
363 bvec4 greaterThanEqual(ivec4 x, ivec4 y);
364 bvec2 equal(vec2 x, vec2 y);
365 bvec3 equal(vec3 x, vec3 y);
366 bvec4 equal(vec4 x, vec4 y);
367 bvec2 equal(ivec2 x, ivec2 y);
368 bvec3 equal(ivec3 x, ivec3 y);
369 bvec4 equal(ivec4 x, ivec4 y);
370 bvec2 notEqual(vec2 x, vec2 y);
371 bvec3 notEqual(vec3 x, vec3 y);
372 bvec4 notEqual(vec4 x, vec4 y);
373 bvec2 notEqual(ivec2 x, ivec2 y);
374 bvec3 notEqual(ivec3 x, ivec3 y);
375 bvec4 notEqual(ivec4 x, ivec4 y);
376 bool any(bvec2 x);
377 bool any(bvec3 x);
378 bool any(bvec4 x);
379 bool all(bvec2 x);
380 bool all(bvec3 x);
381 bool all(bvec4 x);
382 bool not(bvec2 x);
383 bool not(bvec3 x);
384 bool not(bvec4 x);
385 void imulExtended(int x, int y, out int msb, out int lsb);
386 void imulExtended(ivec2 x, ivec2 y, out ivec2 msb, out ivec2 lsb);
387 void imulExtended(ivec3 x, ivec3 y, out ivec3 msb, out ivec3 lsb);
388 void imulExtended(ivec4 x, ivec4 y, out ivec4 msb, out ivec4 lsb);
389 int bitfieldExtract(int value, int offset, int bits);
390 ivec2 bitfieldExtract(ivec2 value, int offset, int bits);
391 ivec3 bitfieldExtract(ivec3 value, int offset, int bits);
392 ivec4 bitfieldExtract(ivec4 value, int offset, int bits);
393 int bitfieldInsert(int value, int insert, int offset, int bits);
394 ivec2 bitfieldInsert(ivec2 value, ivec2 insert, int offset, int bits);
395 ivec3 bitfieldInsert(ivec3 value, ivec3 insert, int offset, int bits);
396 ivec4 bitfieldInsert(ivec4 value, ivec4 insert, int offset, int bits);
397 int bitfieldReverse(int value);
398 ivec2 bitfieldReverse(ivec2 value);
399 ivec3 bitfieldReverse(ivec3 value);
400 ivec4 bitfieldReverse(ivec4 value);
401 int bitCount(int value);
402 ivec2 bitCount(ivec2 value);
403 ivec3 bitCount(ivec3 value);
404 ivec4 bitCount(ivec4 value);
405 int findLSB(int value);
406 ivec2 findLSB(ivec2 value);
407 ivec3 findLSB(ivec3 value);
408 ivec4 findLSB(ivec4 value);
409 int findMSB(int value);
410 ivec2 findMSB(ivec2 value);
411 ivec3 findMSB(ivec3 value);
412 ivec4 findMSB(ivec4 value);
413 int textureSize(sampler1D sampler, int lod);
414 ivec2 textureSize(sampler2D sampler, int lod);
415 ivec3 textureSize(sampler3D sampler, int lod);
416 ivec2 textureSize(sampler1DArray sampler, int lod);
417 ivec3 textureSize(sampler2DArray sampler, int lod);
418 ivec2 textureSize(samplerCube sampler, int lod);
419 ivec3 textureSize(samplerCubeArray sampler, int lod);
420 int textureSize(sampler1DShadow sampler, int lod);
421 ivec2 textureSize(sampler2DShadow sampler, int lod);
422 ivec2 textureSize(samplerCubeShadow sampler, int lod);
423 ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
424 ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
425 ivec3 textureSize(samplerCubeArrayShadow sampler, int lod);
426 vec4 texture(sampler1D sampler, float P);
427 vec4 texture(sampler2D sampler, vec2 P);
428 vec4 texture(sampler3D sampler, vec3 P);
429 vec4 texture(sampler1DArray sampler, vec2 P);
430 vec4 texture(sampler2DArray sampler, vec3 P);
431 vec4 texture(samplerCube sampler, vec3 P);
432 vec4 texture(samplerCubeArray sampler, vec4 P);
433 float texture(sampler1DShadow sampler, vec3 P);
434 float texture(sampler2DShadow sampler, vec3 P);
435 float texture(samplerCubeShadow sampler, vec4 P);
436 float texture(sampler1DArrayShadow sampler, vec3 P);
437 float texture(sampler2DArrayShadow sampler, vec4 P);
438 float texture(samplerCubeArrayShadow sampler, vec4 P, float compare);
439 vec4 textureLod(sampler1D sampler, float P, float lod);
440 vec4 textureLod(sampler2D sampler, vec2 P, float lod);
441 vec4 textureLod(sampler3D sampler, vec3 P, float lod);
442 vec4 textureLod(sampler1DArray sampler, vec2 P, float lod);
443 vec4 textureLod(sampler2DArray sampler, vec3 P, float lod);
444 vec4 textureLod(samplerCube sampler, vec3 P, float lod);
445 vec4 textureLod(samplerCubeArray sampler, vec4 P, float lod);
446 vec4 texelFetch(sampler1D sampler, int P, int lod);
447 vec4 texelFetch(sampler2D sampler, ivec2 P, int lod);
448 vec4 texelFetch(sampler3D sampler, ivec3 P, int lod);
449 vec4 texelFetch(sampler1DArray sampler, ivec2 P, int lod);
450 vec4 texelFetch(sampler2DArray sampler, ivec3 P, int lod);
451 // END BUILTIN FUNCTIONS
452
453 #pragma MSP stage(vertex)
454 in int gl_VertexID;
455 in int gl_InstanceID;
456 out gl_PerVertex
457 {
458   vec4 gl_Position;
459   float gl_PointSize;
460   float gl_ClipDistance[];
461 };
462
463 #pragma MSP stage(geometry)
464 in gl_PerVertex
465 {
466   vec4 gl_Position;
467   float gl_PointSize;
468   float gl_ClipDistance[];
469 } gl_in[];
470 in int gl_PrimitiveIDIn;
471 out gl_PerVertex
472 {
473   vec4 gl_Position;
474   float gl_PointSize;
475   float gl_ClipDistance[];
476 };
477 out int gl_PrimitiveID;
478 out int gl_Layer;
479
480 void EmitVertex();
481 void EndPrimitive();
482
483 #pragma MSP stage(fragment)
484 // BEGIN BUILTIN FRAGMENT FUNCTIONS
485 float dFdx(float p);
486 vec2 dFdx(vec2 p);
487 vec3 dFdx(vec3 p);
488 vec4 dFdx(vec4 p);
489 float dFdy(float p);
490 vec2 dFdy(vec2 p);
491 vec3 dFdy(vec3 p);
492 vec4 dFdy(vec4 p);
493 float dFdxFine(float p);
494 vec2 dFdxFine(vec2 p);
495 vec3 dFdxFine(vec3 p);
496 vec4 dFdxFine(vec4 p);
497 float dFdyFine(float p);
498 vec2 dFdyFine(vec2 p);
499 vec3 dFdyFine(vec3 p);
500 vec4 dFdyFine(vec4 p);
501 float dFdxCoarse(float p);
502 vec2 dFdxCoarse(vec2 p);
503 vec3 dFdxCoarse(vec3 p);
504 vec4 dFdxCoarse(vec4 p);
505 float dFdyCoarse(float p);
506 vec2 dFdyCoarse(vec2 p);
507 vec3 dFdyCoarse(vec3 p);
508 vec4 dFdyCoarse(vec4 p);
509 float fwidth(float p);
510 vec2 fwidth(vec2 p);
511 vec3 fwidth(vec3 p);
512 vec4 fwidth(vec4 p);
513 float fwidthFine(float p);
514 vec2 fwidthFine(vec2 p);
515 vec3 fwidthFine(vec3 p);
516 vec4 fwidthFine(vec4 p);
517 float fwidthCoarse(float p);
518 vec2 fwidthCoarse(vec2 p);
519 vec3 fwidthCoarse(vec3 p);
520 vec4 fwidthCoarse(vec4 p);
521 float interpolateAtCentroid(float interpolant);
522 vec2 interpolateAtCentroid(vec2 interpolant);
523 vec3 interpolateAtCentroid(vec3 interpolant);
524 vec4 interpolateAtCentroid(vec4 interpolant);
525 float interpolateAtSample(float interpolant, int sample);
526 vec2 interpolateAtSample(vec2 interpolant, int sample);
527 vec3 interpolateAtSample(vec3 interpolant, int sample);
528 vec4 interpolateAtSample(vec4 interpolant, int sample);
529 float interpolateAtOffset(float interpolant, vec2 offset);
530 vec2 interpolateAtOffset(vec2 interpolant, vec2 offset);
531 vec3 interpolateAtOffset(vec3 interpolant, vec2 offset);
532 vec4 interpolateAtOffset(vec4 interpolant, vec2 offset);
533 // END BUILTIN FRAGMENT FUNCTIONS
534
535 in vec4 gl_FragCoord;
536 in bool gl_FrontFacing;
537 in float gl_ClipDistance[];
538 in vec2 gl_PointCoord;
539 in int gl_PrimitiveID;
540 in int gl_SampleID;
541 in vec2 gl_SamplePosition;
542 in int gl_Layer;
543 out float gl_FragDepth;