• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 130
2/*
3 * 8.1 - Angle and Trigonometry Functions
4 */
5float radians(float degrees);
6vec2  radians(vec2  degrees);
7vec3  radians(vec3  degrees);
8vec4  radians(vec4  degrees);
9
10float degrees(float radians);
11vec2  degrees(vec2  radians);
12vec3  degrees(vec3  radians);
13vec4  degrees(vec4  radians);
14
15float sin(float angle);
16vec2  sin(vec2  angle);
17vec3  sin(vec3  angle);
18vec4  sin(vec4  angle);
19
20float cos(float angle);
21vec2  cos(vec2  angle);
22vec3  cos(vec3  angle);
23vec4  cos(vec4  angle);
24
25float tan(float angle);
26vec2  tan(vec2  angle);
27vec3  tan(vec3  angle);
28vec4  tan(vec4  angle);
29
30float asin(float angle);
31vec2  asin(vec2  angle);
32vec3  asin(vec3  angle);
33vec4  asin(vec4  angle);
34
35float acos(float angle);
36vec2  acos(vec2  angle);
37vec3  acos(vec3  angle);
38vec4  acos(vec4  angle);
39
40float atan(float y, float x);
41vec2  atan(vec2  y, vec2  x);
42vec3  atan(vec3  y, vec3  x);
43vec4  atan(vec4  y, vec4  x);
44
45float atan(float y_over_x);
46vec2  atan(vec2  y_over_x);
47vec3  atan(vec3  y_over_x);
48vec4  atan(vec4  y_over_x);
49
50float sinh(float x);
51vec2  sinh(vec2  x);
52vec3  sinh(vec3  x);
53vec4  sinh(vec4  x);
54
55float cosh(float x);
56vec2  cosh(vec2  x);
57vec3  cosh(vec3  x);
58vec4  cosh(vec4  x);
59
60float tanh(float x);
61vec2  tanh(vec2  x);
62vec3  tanh(vec3  x);
63vec4  tanh(vec4  x);
64
65float asinh(float x);
66vec2  asinh(vec2  x);
67vec3  asinh(vec3  x);
68vec4  asinh(vec4  x);
69
70float acosh(float x);
71vec2  acosh(vec2  x);
72vec3  acosh(vec3  x);
73vec4  acosh(vec4  x);
74
75float atanh(float x);
76vec2  atanh(vec2  x);
77vec3  atanh(vec3  x);
78vec4  atanh(vec4  x);
79
80/*
81 * 8.2 - Exponential Functions
82 */
83float pow(float x, float y);
84vec2  pow(vec2  x, vec2  y);
85vec3  pow(vec3  x, vec3  y);
86vec4  pow(vec4  x, vec4  y);
87
88float exp(float x);
89vec2  exp(vec2  x);
90vec3  exp(vec3  x);
91vec4  exp(vec4  x);
92
93float log(float x);
94vec2  log(vec2  x);
95vec3  log(vec3  x);
96vec4  log(vec4  x);
97
98float exp2(float x);
99vec2  exp2(vec2  x);
100vec3  exp2(vec3  x);
101vec4  exp2(vec4  x);
102
103float log2(float x);
104vec2  log2(vec2  x);
105vec3  log2(vec3  x);
106vec4  log2(vec4  x);
107
108float sqrt(float x);
109vec2  sqrt(vec2  x);
110vec3  sqrt(vec3  x);
111vec4  sqrt(vec4  x);
112
113float inversesqrt(float x);
114vec2  inversesqrt(vec2  x);
115vec3  inversesqrt(vec3  x);
116vec4  inversesqrt(vec4  x);
117
118/*
119 * 8.3 - Common Functions
120 */
121float abs(float x);
122vec2  abs(vec2  x);
123vec3  abs(vec3  x);
124vec4  abs(vec4  x);
125int   abs(int   x);
126ivec2 abs(ivec2 x);
127ivec3 abs(ivec3 x);
128ivec4 abs(ivec4 x);
129
130float sign(float x);
131vec2  sign(vec2  x);
132vec3  sign(vec3  x);
133vec4  sign(vec4  x);
134int   sign(int   x);
135ivec2 sign(ivec2 x);
136ivec3 sign(ivec3 x);
137ivec4 sign(ivec4 x);
138
139float floor(float x);
140vec2  floor(vec2  x);
141vec3  floor(vec3  x);
142vec4  floor(vec4  x);
143
144float trunc(float x);
145vec2  trunc(vec2  x);
146vec3  trunc(vec3  x);
147vec4  trunc(vec4  x);
148
149float round(float x);
150vec2  round(vec2  x);
151vec3  round(vec3  x);
152vec4  round(vec4  x);
153
154float roundEven(float x);
155vec2  roundEven(vec2  x);
156vec3  roundEven(vec3  x);
157vec4  roundEven(vec4  x);
158
159float ceil(float x);
160vec2  ceil(vec2  x);
161vec3  ceil(vec3  x);
162vec4  ceil(vec4  x);
163
164float fract(float x);
165vec2  fract(vec2  x);
166vec3  fract(vec3  x);
167vec4  fract(vec4  x);
168
169float mod(float x, float y);
170vec2  mod(vec2  x, float y);
171vec3  mod(vec3  x, float y);
172vec4  mod(vec4  x, float y);
173
174vec2  mod(vec2  x, vec2  y);
175vec3  mod(vec3  x, vec3  y);
176vec4  mod(vec4  x, vec4  y);
177
178float modf(float x, out float i);
179vec2  modf(vec2  x, out vec2  i);
180vec3  modf(vec3  x, out vec3  i);
181vec4  modf(vec4  x, out vec4  i);
182
183float min(float x, float y);
184vec2  min(vec2  x, vec2  y);
185vec3  min(vec3  x, vec3  y);
186vec4  min(vec4  x, vec4  y);
187
188vec2  min(vec2  x, float y);
189vec3  min(vec3  x, float y);
190vec4  min(vec4  x, float y);
191
192int   min(int   x, int   y);
193ivec2 min(ivec2 x, ivec2 y);
194ivec3 min(ivec3 x, ivec3 y);
195ivec4 min(ivec4 x, ivec4 y);
196
197ivec2 min(ivec2 x, int   y);
198ivec3 min(ivec3 x, int   y);
199ivec4 min(ivec4 x, int   y);
200
201uint  min(uint  x, uint  y);
202uvec2 min(uvec2 x, uvec2 y);
203uvec3 min(uvec3 x, uvec3 y);
204uvec4 min(uvec4 x, uvec4 y);
205
206uvec2 min(uvec2 x, uint  y);
207uvec3 min(uvec3 x, uint  y);
208uvec4 min(uvec4 x, uint  y);
209
210float max(float x, float y);
211vec2  max(vec2  x, vec2  y);
212vec3  max(vec3  x, vec3  y);
213vec4  max(vec4  x, vec4  y);
214
215vec2  max(vec2  x, float y);
216vec3  max(vec3  x, float y);
217vec4  max(vec4  x, float y);
218
219int   max(int   x, int   y);
220ivec2 max(ivec2 x, ivec2 y);
221ivec3 max(ivec3 x, ivec3 y);
222ivec4 max(ivec4 x, ivec4 y);
223
224ivec2 max(ivec2 x, int   y);
225ivec3 max(ivec3 x, int   y);
226ivec4 max(ivec4 x, int   y);
227
228uint  max(uint  x, uint  y);
229uvec2 max(uvec2 x, uvec2 y);
230uvec3 max(uvec3 x, uvec3 y);
231uvec4 max(uvec4 x, uvec4 y);
232
233uvec2 max(uvec2 x, uint  y);
234uvec3 max(uvec3 x, uint  y);
235uvec4 max(uvec4 x, uint  y);
236
237float clamp(float x, float minVal, float maxVal);
238vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);
239vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);
240vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);
241
242vec2  clamp(vec2  x, float minVal, float maxVal);
243vec3  clamp(vec3  x, float minVal, float maxVal);
244vec4  clamp(vec4  x, float minVal, float maxVal);
245
246int   clamp(int   x, int   minVal, int   maxVal);
247ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);
248ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);
249ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);
250
251ivec2 clamp(ivec2 x, int   minVal, int   maxVal);
252ivec3 clamp(ivec3 x, int   minVal, int   maxVal);
253ivec4 clamp(ivec4 x, int   minVal, int   maxVal);
254
255uint  clamp(uint  x, uint  minVal, uint  maxVal);
256uvec2 clamp(uvec2 x, uvec2 minVal, uvec2 maxVal);
257uvec3 clamp(uvec3 x, uvec3 minVal, uvec3 maxVal);
258uvec4 clamp(uvec4 x, uvec4 minVal, uvec4 maxVal);
259
260uvec2 clamp(uvec2 x, uint  minVal, uint  maxVal);
261uvec3 clamp(uvec3 x, uint  minVal, uint  maxVal);
262uvec4 clamp(uvec4 x, uint  minVal, uint  maxVal);
263
264float mix(float x, float y, float a);
265vec2  mix(vec2  x, vec2  y, vec2  a);
266vec3  mix(vec3  x, vec3  y, vec3  a);
267vec4  mix(vec4  x, vec4  y, vec4  a);
268
269vec2  mix(vec2  x, vec2  y, float a);
270vec3  mix(vec3  x, vec3  y, float a);
271vec4  mix(vec4  x, vec4  y, float a);
272
273float mix(float x, float y, bool  a);
274vec2  mix(vec2  x, vec2  y, bvec2 a);
275vec3  mix(vec3  x, vec3  y, bvec3 a);
276vec4  mix(vec4  x, vec4  y, bvec4 a);
277
278float step(float edge, float x);
279vec2  step(vec2  edge, vec2  x);
280vec3  step(vec3  edge, vec3  x);
281vec4  step(vec4  edge, vec4  x);
282
283vec2  step(float edge, vec2  x);
284vec3  step(float edge, vec3  x);
285vec4  step(float edge, vec4  x);
286
287float smoothstep(float edge0, float edge1, float x);
288vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);
289vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);
290vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);
291
292vec2  smoothstep(float edge0, float edge1, vec2  x);
293vec3  smoothstep(float edge0, float edge1, vec3  x);
294vec4  smoothstep(float edge0, float edge1, vec4  x);
295
296bool  isnan(float x);
297bvec2 isnan(vec2  x);
298bvec3 isnan(vec3  x);
299bvec4 isnan(vec4  x);
300
301bool  isinf(float x);
302bvec2 isinf(vec2  x);
303bvec3 isinf(vec3  x);
304bvec4 isinf(vec4  x);
305
306/*
307 * 8.4 - Geometric Functions
308 */
309float length(float x);
310float length(vec2  x);
311float length(vec3  x);
312float length(vec4  x);
313
314float distance(float p0, float p1);
315float distance(vec2  p0, vec2  p1);
316float distance(vec3  p0, vec3  p1);
317float distance(vec4  p0, vec4  p1);
318
319float dot(float x, float y);
320float dot(vec2  x, vec2  y);
321float dot(vec3  x, vec3  y);
322float dot(vec4  x, vec4  y);
323
324vec3 cross(vec3 x, vec3 y);
325
326float normalize(float x);
327vec2  normalize(vec2  x);
328vec3  normalize(vec3  x);
329vec4  normalize(vec4  x);
330
331float faceforward(float N, float I, float Nref);
332vec2  faceforward(vec2  N, vec2  I, vec2  Nref);
333vec3  faceforward(vec3  N, vec3  I, vec3  Nref);
334vec4  faceforward(vec4  N, vec4  I, vec4  Nref);
335
336float reflect(float I, float N);
337vec2  reflect(vec2  I, vec2  N);
338vec3  reflect(vec3  I, vec3  N);
339vec4  reflect(vec4  I, vec4  N);
340
341float refract(float I, float N, float eta);
342vec2  refract(vec2  I, vec2  N, float eta);
343vec3  refract(vec3  I, vec3  N, float eta);
344vec4  refract(vec4  I, vec4  N, float eta);
345
346
347/*
348 * 8.5 - Matrix Functions
349 */
350mat2   matrixCompMult(mat2   x, mat2   y);
351mat3   matrixCompMult(mat3   x, mat3   y);
352mat4   matrixCompMult(mat4   x, mat4   y);
353mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
354mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
355mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
356mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
357mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
358mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
359
360mat2   outerProduct(vec2 c, vec2 r);
361mat3   outerProduct(vec3 c, vec3 r);
362mat4   outerProduct(vec4 c, vec4 r);
363
364mat2x3 outerProduct(vec3 c, vec2 r);
365mat3x2 outerProduct(vec2 c, vec3 r);
366
367mat2x4 outerProduct(vec4 c, vec2 r);
368mat4x2 outerProduct(vec2 c, vec4 r);
369
370mat3x4 outerProduct(vec4 c, vec3 r);
371mat4x3 outerProduct(vec3 c, vec4 r);
372
373mat2   transpose(mat2 m);
374mat3   transpose(mat3 m);
375mat4   transpose(mat4 m);
376
377mat2x3 transpose(mat3x2 m);
378mat3x2 transpose(mat2x3 m);
379
380mat2x4 transpose(mat4x2 m);
381mat4x2 transpose(mat2x4 m);
382
383mat3x4 transpose(mat4x3 m);
384mat4x3 transpose(mat3x4 m);
385
386/*
387 * 8.6 - Vector Relational Functions
388 */
389bvec2 lessThan( vec2 x,  vec2 y);
390bvec3 lessThan( vec3 x,  vec3 y);
391bvec4 lessThan( vec4 x,  vec4 y);
392bvec2 lessThan(ivec2 x, ivec2 y);
393bvec3 lessThan(ivec3 x, ivec3 y);
394bvec4 lessThan(ivec4 x, ivec4 y);
395bvec2 lessThan(uvec2 x, uvec2 y);
396bvec3 lessThan(uvec3 x, uvec3 y);
397bvec4 lessThan(uvec4 x, uvec4 y);
398
399bvec2 lessThanEqual( vec2 x,  vec2 y);
400bvec3 lessThanEqual( vec3 x,  vec3 y);
401bvec4 lessThanEqual( vec4 x,  vec4 y);
402bvec2 lessThanEqual(ivec2 x, ivec2 y);
403bvec3 lessThanEqual(ivec3 x, ivec3 y);
404bvec4 lessThanEqual(ivec4 x, ivec4 y);
405bvec2 lessThanEqual(uvec2 x, uvec2 y);
406bvec3 lessThanEqual(uvec3 x, uvec3 y);
407bvec4 lessThanEqual(uvec4 x, uvec4 y);
408
409bvec2 greaterThan( vec2 x,  vec2 y);
410bvec3 greaterThan( vec3 x,  vec3 y);
411bvec4 greaterThan( vec4 x,  vec4 y);
412bvec2 greaterThan(ivec2 x, ivec2 y);
413bvec3 greaterThan(ivec3 x, ivec3 y);
414bvec4 greaterThan(ivec4 x, ivec4 y);
415bvec2 greaterThan(uvec2 x, uvec2 y);
416bvec3 greaterThan(uvec3 x, uvec3 y);
417bvec4 greaterThan(uvec4 x, uvec4 y);
418
419bvec2 greaterThanEqual( vec2 x,  vec2 y);
420bvec3 greaterThanEqual( vec3 x,  vec3 y);
421bvec4 greaterThanEqual( vec4 x,  vec4 y);
422bvec2 greaterThanEqual(ivec2 x, ivec2 y);
423bvec3 greaterThanEqual(ivec3 x, ivec3 y);
424bvec4 greaterThanEqual(ivec4 x, ivec4 y);
425bvec2 greaterThanEqual(uvec2 x, uvec2 y);
426bvec3 greaterThanEqual(uvec3 x, uvec3 y);
427bvec4 greaterThanEqual(uvec4 x, uvec4 y);
428
429bvec2 equal( vec2 x,  vec2 y);
430bvec3 equal( vec3 x,  vec3 y);
431bvec4 equal( vec4 x,  vec4 y);
432bvec2 equal(ivec2 x, ivec2 y);
433bvec3 equal(ivec3 x, ivec3 y);
434bvec4 equal(ivec4 x, ivec4 y);
435bvec2 equal(uvec2 x, uvec2 y);
436bvec3 equal(uvec3 x, uvec3 y);
437bvec4 equal(uvec4 x, uvec4 y);
438bvec2 equal(bvec2 x, bvec2 y);
439bvec3 equal(bvec3 x, bvec3 y);
440bvec4 equal(bvec4 x, bvec4 y);
441
442bvec2 notEqual( vec2 x,  vec2 y);
443bvec3 notEqual( vec3 x,  vec3 y);
444bvec4 notEqual( vec4 x,  vec4 y);
445bvec2 notEqual(ivec2 x, ivec2 y);
446bvec3 notEqual(ivec3 x, ivec3 y);
447bvec4 notEqual(ivec4 x, ivec4 y);
448bvec2 notEqual(uvec2 x, uvec2 y);
449bvec3 notEqual(uvec3 x, uvec3 y);
450bvec4 notEqual(uvec4 x, uvec4 y);
451bvec2 notEqual(bvec2 x, bvec2 y);
452bvec3 notEqual(bvec3 x, bvec3 y);
453bvec4 notEqual(bvec4 x, bvec4 y);
454
455bool any(bvec2 x);
456bool any(bvec3 x);
457bool any(bvec4 x);
458
459bool all(bvec2 x);
460bool all(bvec3 x);
461bool all(bvec4 x);
462
463bvec2 not(bvec2 x);
464bvec3 not(bvec3 x);
465bvec4 not(bvec4 x);
466
467/*
468 * 8.7 - Texture Lookup Functions
469 */
470
471/* textureSize */
472int   textureSize( sampler1D sampler, int lod);
473int   textureSize(isampler1D sampler, int lod);
474int   textureSize(usampler1D sampler, int lod);
475
476ivec2 textureSize( sampler2D sampler, int lod);
477ivec2 textureSize(isampler2D sampler, int lod);
478ivec2 textureSize(usampler2D sampler, int lod);
479
480ivec3 textureSize( sampler3D sampler, int lod);
481ivec3 textureSize(isampler3D sampler, int lod);
482ivec3 textureSize(usampler3D sampler, int lod);
483
484ivec2 textureSize( samplerCube sampler, int lod);
485ivec2 textureSize(isamplerCube sampler, int lod);
486ivec2 textureSize(usamplerCube sampler, int lod);
487
488int   textureSize(sampler1DShadow   sampler, int lod);
489ivec2 textureSize(sampler2DShadow   sampler, int lod);
490ivec2 textureSize(samplerCubeShadow sampler, int lod);
491
492ivec2 textureSize( sampler1DArray sampler, int lod);
493ivec2 textureSize(isampler1DArray sampler, int lod);
494ivec2 textureSize(usampler1DArray sampler, int lod);
495ivec3 textureSize( sampler2DArray sampler, int lod);
496ivec3 textureSize(isampler2DArray sampler, int lod);
497ivec3 textureSize(usampler2DArray sampler, int lod);
498
499ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
500ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
501
502/* texture - no bias */
503 vec4 texture( sampler1D sampler, float P);
504ivec4 texture(isampler1D sampler, float P);
505uvec4 texture(usampler1D sampler, float P);
506
507 vec4 texture( sampler2D sampler, vec2 P);
508ivec4 texture(isampler2D sampler, vec2 P);
509uvec4 texture(usampler2D sampler, vec2 P);
510
511 vec4 texture( sampler3D sampler, vec3 P);
512ivec4 texture(isampler3D sampler, vec3 P);
513uvec4 texture(usampler3D sampler, vec3 P);
514
515 vec4 texture( samplerCube sampler, vec3 P);
516ivec4 texture(isamplerCube sampler, vec3 P);
517uvec4 texture(usamplerCube sampler, vec3 P);
518
519float texture(sampler1DShadow   sampler, vec3 P);
520float texture(sampler2DShadow   sampler, vec3 P);
521float texture(samplerCubeShadow sampler, vec4 P);
522
523 vec4 texture( sampler1DArray sampler, vec2 P);
524ivec4 texture(isampler1DArray sampler, vec2 P);
525uvec4 texture(usampler1DArray sampler, vec2 P);
526
527 vec4 texture( sampler2DArray sampler, vec3 P);
528ivec4 texture(isampler2DArray sampler, vec3 P);
529uvec4 texture(usampler2DArray sampler, vec3 P);
530
531float texture(sampler1DArrayShadow sampler, vec3 P);
532float texture(sampler2DArrayShadow sampler, vec4 P);
533
534/* textureProj - no bias */
535 vec4 textureProj( sampler1D sampler, vec2 P);
536ivec4 textureProj(isampler1D sampler, vec2 P);
537uvec4 textureProj(usampler1D sampler, vec2 P);
538 vec4 textureProj( sampler1D sampler, vec4 P);
539ivec4 textureProj(isampler1D sampler, vec4 P);
540uvec4 textureProj(usampler1D sampler, vec4 P);
541
542 vec4 textureProj( sampler2D sampler, vec3 P);
543ivec4 textureProj(isampler2D sampler, vec3 P);
544uvec4 textureProj(usampler2D sampler, vec3 P);
545 vec4 textureProj( sampler2D sampler, vec4 P);
546ivec4 textureProj(isampler2D sampler, vec4 P);
547uvec4 textureProj(usampler2D sampler, vec4 P);
548
549 vec4 textureProj( sampler3D sampler, vec4 P);
550ivec4 textureProj(isampler3D sampler, vec4 P);
551uvec4 textureProj(usampler3D sampler, vec4 P);
552
553float textureProj(sampler1DShadow sampler, vec4 P);
554float textureProj(sampler2DShadow sampler, vec4 P);
555
556/* textureLod */
557 vec4 textureLod( sampler1D sampler, float P, float lod);
558ivec4 textureLod(isampler1D sampler, float P, float lod);
559uvec4 textureLod(usampler1D sampler, float P, float lod);
560
561 vec4 textureLod( sampler2D sampler, vec2 P, float lod);
562ivec4 textureLod(isampler2D sampler, vec2 P, float lod);
563uvec4 textureLod(usampler2D sampler, vec2 P, float lod);
564
565 vec4 textureLod( sampler3D sampler, vec3 P, float lod);
566ivec4 textureLod(isampler3D sampler, vec3 P, float lod);
567uvec4 textureLod(usampler3D sampler, vec3 P, float lod);
568
569 vec4 textureLod( samplerCube sampler, vec3 P, float lod);
570ivec4 textureLod(isamplerCube sampler, vec3 P, float lod);
571uvec4 textureLod(usamplerCube sampler, vec3 P, float lod);
572
573float textureLod(sampler1DShadow sampler, vec3 P, float lod);
574float textureLod(sampler2DShadow sampler, vec3 P, float lod);
575
576 vec4 textureLod( sampler1DArray sampler, vec2 P, float lod);
577ivec4 textureLod(isampler1DArray sampler, vec2 P, float lod);
578uvec4 textureLod(usampler1DArray sampler, vec2 P, float lod);
579
580 vec4 textureLod( sampler2DArray sampler, vec3 P, float lod);
581ivec4 textureLod(isampler2DArray sampler, vec3 P, float lod);
582uvec4 textureLod(usampler2DArray sampler, vec3 P, float lod);
583
584float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);
585
586/* textureOffset - no bias */
587 vec4 textureOffset( sampler1D sampler, float P, int offset);
588ivec4 textureOffset(isampler1D sampler, float P, int offset);
589uvec4 textureOffset(usampler1D sampler, float P, int offset);
590
591 vec4 textureOffset( sampler2D sampler, vec2 P, ivec2 offset);
592ivec4 textureOffset(isampler2D sampler, vec2 P, ivec2 offset);
593uvec4 textureOffset(usampler2D sampler, vec2 P, ivec2 offset);
594
595 vec4 textureOffset( sampler3D sampler, vec3 P, ivec3 offset);
596ivec4 textureOffset(isampler3D sampler, vec3 P, ivec3 offset);
597uvec4 textureOffset(usampler3D sampler, vec3 P, ivec3 offset);
598
599float textureOffset(sampler1DShadow sampler, vec3 P, int offset);
600float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset);
601
602 vec4 textureOffset( sampler1DArray sampler, vec2 P, int offset);
603ivec4 textureOffset(isampler1DArray sampler, vec2 P, int offset);
604uvec4 textureOffset(usampler1DArray sampler, vec2 P, int offset);
605
606 vec4 textureOffset( sampler2DArray sampler, vec3 P, ivec2 offset);
607ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset);
608uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset);
609
610float textureOffset(sampler1DArrayShadow sampler, vec3 P, int offset);
611
612/* texelFetch */
613 vec4 texelFetch( sampler1D sampler, int P, int lod);
614ivec4 texelFetch(isampler1D sampler, int P, int lod);
615uvec4 texelFetch(usampler1D sampler, int P, int lod);
616
617 vec4 texelFetch( sampler2D sampler, ivec2 P, int lod);
618ivec4 texelFetch(isampler2D sampler, ivec2 P, int lod);
619uvec4 texelFetch(usampler2D sampler, ivec2 P, int lod);
620
621 vec4 texelFetch( sampler3D sampler, ivec3 P, int lod);
622ivec4 texelFetch(isampler3D sampler, ivec3 P, int lod);
623uvec4 texelFetch(usampler3D sampler, ivec3 P, int lod);
624
625 vec4 texelFetch( sampler1DArray sampler, ivec2 P, int lod);
626ivec4 texelFetch(isampler1DArray sampler, ivec2 P, int lod);
627uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod);
628
629 vec4 texelFetch( sampler2DArray sampler, ivec3 P, int lod);
630ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
631uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
632
633/* texelFetchOffset */
634 vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
635ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
636uvec4 texelFetchOffset(usampler1D sampler, int P, int lod, int offset);
637
638 vec4 texelFetchOffset( sampler2D sampler, ivec2 P, int lod, ivec2 offset);
639ivec4 texelFetchOffset(isampler2D sampler, ivec2 P, int lod, ivec2 offset);
640uvec4 texelFetchOffset(usampler2D sampler, ivec2 P, int lod, ivec2 offset);
641
642 vec4 texelFetchOffset( sampler3D sampler, ivec3 P, int lod, ivec3 offset);
643ivec4 texelFetchOffset(isampler3D sampler, ivec3 P, int lod, ivec3 offset);
644uvec4 texelFetchOffset(usampler3D sampler, ivec3 P, int lod, ivec3 offset);
645
646 vec4 texelFetchOffset( sampler1DArray sampler, ivec2 P, int lod, int offset);
647ivec4 texelFetchOffset(isampler1DArray sampler, ivec2 P, int lod, int offset);
648uvec4 texelFetchOffset(usampler1DArray sampler, ivec2 P, int lod, int offset);
649
650 vec4 texelFetchOffset( sampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
651ivec4 texelFetchOffset(isampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
652uvec4 texelFetchOffset(usampler2DArray sampler, ivec3 P, int lod, ivec2 offset);
653
654/* textureProjOffset - no bias */
655 vec4 textureProjOffset( sampler1D sampler, vec2 P, int offset);
656ivec4 textureProjOffset(isampler1D sampler, vec2 P, int offset);
657uvec4 textureProjOffset(usampler1D sampler, vec2 P, int offset);
658 vec4 textureProjOffset( sampler1D sampler, vec4 P, int offset);
659ivec4 textureProjOffset(isampler1D sampler, vec4 P, int offset);
660uvec4 textureProjOffset(usampler1D sampler, vec4 P, int offset);
661
662 vec4 textureProjOffset( sampler2D sampler, vec3 P, ivec2 offset);
663ivec4 textureProjOffset(isampler2D sampler, vec3 P, ivec2 offset);
664uvec4 textureProjOffset(usampler2D sampler, vec3 P, ivec2 offset);
665 vec4 textureProjOffset( sampler2D sampler, vec4 P, ivec2 offset);
666ivec4 textureProjOffset(isampler2D sampler, vec4 P, ivec2 offset);
667uvec4 textureProjOffset(usampler2D sampler, vec4 P, ivec2 offset);
668
669 vec4 textureProjOffset( sampler3D sampler, vec4 P, ivec3 offset);
670ivec4 textureProjOffset(isampler3D sampler, vec4 P, ivec3 offset);
671uvec4 textureProjOffset(usampler3D sampler, vec4 P, ivec3 offset);
672
673float textureProjOffset(sampler1DShadow sampler, vec4 P, int offset);
674float textureProjOffset(sampler2DShadow sampler, vec4 P, ivec2 offset);
675
676/* textureLodOffset */
677 vec4 textureLodOffset( sampler1D sampler, float P, float lod, int offset);
678ivec4 textureLodOffset(isampler1D sampler, float P, float lod, int offset);
679uvec4 textureLodOffset(usampler1D sampler, float P, float lod, int offset);
680
681 vec4 textureLodOffset( sampler2D sampler, vec2 P, float lod, ivec2 offset);
682ivec4 textureLodOffset(isampler2D sampler, vec2 P, float lod, ivec2 offset);
683uvec4 textureLodOffset(usampler2D sampler, vec2 P, float lod, ivec2 offset);
684
685 vec4 textureLodOffset( sampler3D sampler, vec3 P, float lod, ivec3 offset);
686ivec4 textureLodOffset(isampler3D sampler, vec3 P, float lod, ivec3 offset);
687uvec4 textureLodOffset(usampler3D sampler, vec3 P, float lod, ivec3 offset);
688
689float textureLodOffset(sampler1DShadow samp, vec3 P, float lod, int offset);
690float textureLodOffset(sampler2DShadow samp, vec3 P, float lod, ivec2 offset);
691
692 vec4 textureLodOffset( sampler1DArray sampler, vec2 P, float lod, int offset);
693ivec4 textureLodOffset(isampler1DArray sampler, vec2 P, float lod, int offset);
694uvec4 textureLodOffset(usampler1DArray sampler, vec2 P, float lod, int offset);
695
696 vec4 textureLodOffset( sampler2DArray samp, vec3 P, float lod, ivec2 offset);
697ivec4 textureLodOffset(isampler2DArray samp, vec3 P, float lod, ivec2 offset);
698uvec4 textureLodOffset(usampler2DArray samp, vec3 P, float lod, ivec2 offset);
699
700float textureLodOffset(sampler1DArrayShadow s, vec3 P, float lod, int offset);
701
702/* textureProjLod */
703 vec4 textureProjLod( sampler1D sampler, vec2 P, float lod);
704ivec4 textureProjLod(isampler1D sampler, vec2 P, float lod);
705uvec4 textureProjLod(usampler1D sampler, vec2 P, float lod);
706 vec4 textureProjLod( sampler1D sampler, vec4 P, float lod);
707ivec4 textureProjLod(isampler1D sampler, vec4 P, float lod);
708uvec4 textureProjLod(usampler1D sampler, vec4 P, float lod);
709
710 vec4 textureProjLod( sampler2D sampler, vec3 P, float lod);
711ivec4 textureProjLod(isampler2D sampler, vec3 P, float lod);
712uvec4 textureProjLod(usampler2D sampler, vec3 P, float lod);
713 vec4 textureProjLod( sampler2D sampler, vec4 P, float lod);
714ivec4 textureProjLod(isampler2D sampler, vec4 P, float lod);
715uvec4 textureProjLod(usampler2D sampler, vec4 P, float lod);
716
717 vec4 textureProjLod( sampler3D sampler, vec4 P, float lod);
718ivec4 textureProjLod(isampler3D sampler, vec4 P, float lod);
719uvec4 textureProjLod(usampler3D sampler, vec4 P, float lod);
720
721float textureProjLod(sampler1DShadow sampler, vec4 P, float lod);
722float textureProjLod(sampler2DShadow sampler, vec4 P, float lod);
723
724/* textureProjLodOffset */
725 vec4 textureProjLodOffset( sampler1D sampler, vec2 P, float lod, int offset);
726ivec4 textureProjLodOffset(isampler1D sampler, vec2 P, float lod, int offset);
727uvec4 textureProjLodOffset(usampler1D sampler, vec2 P, float lod, int offset);
728 vec4 textureProjLodOffset( sampler1D sampler, vec4 P, float lod, int offset);
729ivec4 textureProjLodOffset(isampler1D sampler, vec4 P, float lod, int offset);
730uvec4 textureProjLodOffset(usampler1D sampler, vec4 P, float lod, int offset);
731
732 vec4 textureProjLodOffset( sampler2D sampler, vec3 P, float lod, ivec2 offset);
733ivec4 textureProjLodOffset(isampler2D sampler, vec3 P, float lod, ivec2 offset);
734uvec4 textureProjLodOffset(usampler2D sampler, vec3 P, float lod, ivec2 offset);
735 vec4 textureProjLodOffset( sampler2D sampler, vec4 P, float lod, ivec2 offset);
736ivec4 textureProjLodOffset(isampler2D sampler, vec4 P, float lod, ivec2 offset);
737uvec4 textureProjLodOffset(usampler2D sampler, vec4 P, float lod, ivec2 offset);
738
739 vec4 textureProjLodOffset( sampler3D sampler, vec4 P, float lod, ivec3 offset);
740ivec4 textureProjLodOffset(isampler3D sampler, vec4 P, float lod, ivec3 offset);
741uvec4 textureProjLodOffset(usampler3D sampler, vec4 P, float lod, ivec3 offset);
742
743float textureProjLodOffset(sampler1DShadow s, vec4 P, float lod, int offset);
744float textureProjLodOffset(sampler2DShadow s, vec4 P, float lod, ivec2 offset);
745
746/* textureGrad */
747 vec4 textureGrad( sampler1D sampler, float P, float dPdx, float dPdy);
748ivec4 textureGrad(isampler1D sampler, float P, float dPdx, float dPdy);
749uvec4 textureGrad(usampler1D sampler, float P, float dPdx, float dPdy);
750
751 vec4 textureGrad( sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
752ivec4 textureGrad(isampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
753uvec4 textureGrad(usampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);
754
755 vec4 textureGrad( sampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
756ivec4 textureGrad(isampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
757uvec4 textureGrad(usampler3D sampler, vec3 P, vec3 dPdx, vec3 dPdy);
758
759 vec4 textureGrad( samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
760ivec4 textureGrad(isamplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
761uvec4 textureGrad(usamplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);
762
763float textureGrad(sampler1DShadow   sampler, vec3 P, float dPdx, float dPdy);
764float textureGrad(sampler2DShadow   sampler, vec3 P, vec2  dPdx, vec2  dPdy);
765float textureGrad(samplerCubeShadow sampler, vec4 P, vec3  dPdx, vec3  dPdy);
766
767 vec4 textureGrad( sampler1DArray sampler, vec2 P, float dPdx, float dPdy);
768ivec4 textureGrad(isampler1DArray sampler, vec2 P, float dPdx, float dPdy);
769uvec4 textureGrad(usampler1DArray sampler, vec2 P, float dPdx, float dPdy);
770
771 vec4 textureGrad( sampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
772ivec4 textureGrad(isampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
773uvec4 textureGrad(usampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
774
775float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy);
776float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2  dPdx, vec2  dPdy);
777
778/* textureGradOffset */
779 vec4 textureGradOffset( sampler1D s, float P, float dx, float dy, int off);
780ivec4 textureGradOffset(isampler1D s, float P, float dx, float dy, int offset);
781uvec4 textureGradOffset(usampler1D s, float P, float dx, float dy, int offset);
782
783 vec4 textureGradOffset( sampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
784ivec4 textureGradOffset(isampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
785uvec4 textureGradOffset(usampler2D s, vec2 P, vec2 dx, vec2 dy, ivec2 offset);
786
787 vec4 textureGradOffset( sampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
788ivec4 textureGradOffset(isampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
789uvec4 textureGradOffset(usampler3D s, vec3 P, vec3 dx, vec3 dy, ivec3 offset);
790
791float textureGradOffset(sampler1DShadow s, vec3 P, float dx, float dy, int off);
792float textureGradOffset(sampler2DShadow s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
793
794 vec4 textureGradOffset( sampler1DArray s, vec2 P, float dx, float dy, int off);
795ivec4 textureGradOffset(isampler1DArray s, vec2 P, float dx, float dy, int off);
796uvec4 textureGradOffset(usampler1DArray s, vec2 P, float dx, float dy, int off);
797
798 vec4 textureGradOffset( sampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
799ivec4 textureGradOffset(isampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
800uvec4 textureGradOffset(usampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
801
802float textureGradOffset(sampler1DArrayShadow s, vec3 P, float dx, float dy, int o);
803float textureGradOffset(sampler2DArrayShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
804
805/* textureProjGrad */
806 vec4 textureProjGrad( sampler1D sampler, vec2 P, float dPdx, float dPdy);
807ivec4 textureProjGrad(isampler1D sampler, vec2 P, float dPdx, float dPdy);
808uvec4 textureProjGrad(usampler1D sampler, vec2 P, float dPdx, float dPdy);
809 vec4 textureProjGrad( sampler1D sampler, vec4 P, float dPdx, float dPdy);
810ivec4 textureProjGrad(isampler1D sampler, vec4 P, float dPdx, float dPdy);
811uvec4 textureProjGrad(usampler1D sampler, vec4 P, float dPdx, float dPdy);
812
813 vec4 textureProjGrad( sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
814ivec4 textureProjGrad(isampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
815uvec4 textureProjGrad(usampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);
816 vec4 textureProjGrad( sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
817ivec4 textureProjGrad(isampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
818uvec4 textureProjGrad(usampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);
819
820 vec4 textureProjGrad( sampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
821ivec4 textureProjGrad(isampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
822uvec4 textureProjGrad(usampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
823
824float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy);
825float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2  dPdx, vec2  dPdy);
826
827/* textureProjGradOffset */
828 vec4 textureProjGradOffset( sampler1D s, vec2 P, float dx, float dy, int off);
829ivec4 textureProjGradOffset(isampler1D s, vec2 P, float dx, float dy, int off);
830uvec4 textureProjGradOffset(usampler1D s, vec2 P, float dx, float dy, int off);
831 vec4 textureProjGradOffset( sampler1D s, vec4 P, float dx, float dy, int off);
832ivec4 textureProjGradOffset(isampler1D s, vec4 P, float dx, float dy, int off);
833uvec4 textureProjGradOffset(usampler1D s, vec4 P, float dx, float dy, int off);
834
835 vec4 textureProjGradOffset( sampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
836ivec4 textureProjGradOffset(isampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
837uvec4 textureProjGradOffset(usampler2D s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
838 vec4 textureProjGradOffset( sampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
839ivec4 textureProjGradOffset(isampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
840uvec4 textureProjGradOffset(usampler2D s, vec4 P, vec2 dx, vec2 dy, ivec2 off);
841
842 vec4 textureProjGradOffset( sampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
843ivec4 textureProjGradOffset(isampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
844uvec4 textureProjGradOffset(usampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
845
846float textureProjGradOffset(sampler1DShadow s, vec4 P, float dx, float dy, int o);
847float textureProjGradOffset(sampler2DShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
848
849/*
850 * The following texture functions are deprecated:
851 */
852vec4 texture1D       (sampler1D sampler, float coord);
853vec4 texture1DProj   (sampler1D sampler, vec2  coord);
854vec4 texture1DProj   (sampler1D sampler, vec4  coord);
855vec4 texture1DLod    (sampler1D sampler, float coord, float lod);
856vec4 texture1DProjLod(sampler1D sampler, vec2  coord, float lod);
857vec4 texture1DProjLod(sampler1D sampler, vec4  coord, float lod);
858
859vec4 texture2D       (sampler2D sampler, vec2 coord);
860vec4 texture2DProj   (sampler2D sampler, vec3 coord);
861vec4 texture2DProj   (sampler2D sampler, vec4 coord);
862vec4 texture2DLod    (sampler2D sampler, vec2 coord, float lod);
863vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);
864vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);
865
866vec4 texture3D       (sampler3D sampler, vec3 coord);
867vec4 texture3DProj   (sampler3D sampler, vec4 coord);
868vec4 texture3DLod    (sampler3D sampler, vec3 coord, float lod);
869vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);
870
871vec4 textureCube     (samplerCube sampler, vec3 coord);
872vec4 textureCubeLod  (samplerCube sampler, vec3 coord, float lod);
873
874vec4 shadow1D       (sampler1DShadow sampler, vec3 coord);
875vec4 shadow2D       (sampler2DShadow sampler, vec3 coord);
876vec4 shadow1DProj   (sampler1DShadow sampler, vec4 coord);
877vec4 shadow2DProj   (sampler2DShadow sampler, vec4 coord);
878vec4 shadow1DLod    (sampler1DShadow sampler, vec3 coord, float lod);
879vec4 shadow2DLod    (sampler2DShadow sampler, vec3 coord, float lod);
880vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);
881vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);
882
883/*
884 * 8.9 - Noise Functions
885 */
886float noise1(float x);
887float noise1(vec2  x);
888float noise1(vec3  x);
889float noise1(vec4  x);
890
891vec2  noise2(float x);
892vec2  noise2(vec2  x);
893vec2  noise2(vec3  x);
894vec2  noise2(vec4  x);
895
896vec3  noise3(float x);
897vec3  noise3(vec2  x);
898vec3  noise3(vec3  x);
899vec3  noise3(vec4  x);
900
901vec4  noise4(float x);
902vec4  noise4(vec2  x);
903vec4  noise4(vec3  x);
904vec4  noise4(vec4  x);
905