1 typedef vector(2) float vec2;
2 typedef vector(3) float vec3;
3 typedef vector(4) float vec4;
4 typedef vector(2) vec2 mat2;
6 typedef vector(3) vec2 mat3x2;
7 typedef vector(4) vec2 mat4x2;
8 typedef vector(2) vec3 mat2x3;
9 typedef vector(3) vec3 mat3;
11 typedef vector(4) vec3 mat4x3;
12 typedef vector(2) vec4 mat2x4;
13 typedef vector(3) vec4 mat3x4;
14 typedef vector(4) vec4 mat4;
17 typedef vector(2) int ivec2;
18 typedef vector(3) int ivec3;
19 typedef vector(4) int ivec4;
21 typedef image(dimensions=1, sampled) float sampler1D;
22 typedef image(dimensions=2, sampled) float sampler2D;
23 typedef image(dimensions=3, sampled) float sampler3D;
24 typedef image(dimensions=cube, sampled) float samplerCube;
25 typedef image(dimensions=1[], sampled) float sampler1DArray;
26 typedef image(dimensions=2[], sampled) float sampler2DArray;
27 typedef image(dimensions=cube[], sampled) float samplerCubeArray;
28 typedef image(dimensions=1, shadow, sampled) float sampler1DShadow;
29 typedef image(dimensions=2, shadow, sampled) float sampler2DShadow;
30 typedef image(dimensions=1[], shadow, sampled) float sampler1DArrayShadow;
31 typedef image(dimensions=2[], shadow, sampled) float sampler2DArrayShadow;
32 typedef image(dimensions=cube, shadow, sampled) float samplerCubeShadow;
33 typedef image(dimensions=cube[], shadow, sampled) float samplerCubeArrayShadow;
35 // BEGIN BUILTIN FUNCTIONS
36 float sin(float angle);
40 float cos(float angle);
44 float tan(float angle);
56 float atan(float y, float x);
57 vec2 atan(vec2 y, vec2 x);
58 vec3 atan(vec3 y, vec3 x);
59 vec4 atan(vec4 y, vec4 x);
60 float sinh(float angle);
61 vec2 sinh(vec2 angle);
62 vec3 sinh(vec3 angle);
63 vec4 sinh(vec4 angle);
64 float cosh(float angle);
65 vec2 cosh(vec2 angle);
66 vec3 cosh(vec3 angle);
67 vec4 cosh(vec4 angle);
68 float tanh(float angle);
69 vec2 tanh(vec2 angle);
70 vec3 tanh(vec3 angle);
71 vec4 tanh(vec4 angle);
84 float pow(float x, float y);
85 vec2 pow(vec2 x, vec2 y);
86 vec3 pow(vec3 x, vec3 y);
87 vec4 pow(vec4 x, vec4 y);
108 float inversesqrt(float x);
109 vec2 inversesqrt(vec2 x);
110 vec3 inversesqrt(vec3 x);
111 vec4 inversesqrt(vec4 x);
128 float floor(float x);
132 float trunc(float x);
136 float round(float x);
140 float roundEven(float x);
141 vec2 roundEven(vec2 x);
142 vec3 roundEven(vec3 x);
143 vec4 roundEven(vec4 x);
148 float fract(float x);
152 float mod(float x, float y);
153 vec2 mod(vec2 x, vec2 y);
154 vec3 mod(vec3 x, vec3 y);
155 vec4 mod(vec4 x, vec4 y);
156 vec2 mod(vec2 x, float y);
157 vec3 mod(vec3 x, float y);
158 vec4 mod(vec4 x, float y);
159 float modf(float x, out float y);
160 vec2 modf(vec2 x, out vec2 y);
161 vec3 modf(vec3 x, out vec3 y);
162 vec4 modf(vec4 x, out vec4 y);
163 float min(float x, float y);
164 vec2 min(vec2 x, vec2 y);
165 vec3 min(vec3 x, vec3 y);
166 vec4 min(vec4 x, vec4 y);
167 int min(int x, int y);
168 ivec2 min(ivec2 x, ivec2 y);
169 ivec3 min(ivec3 x, ivec3 y);
170 ivec4 min(ivec4 x, ivec4 y);
171 vec2 min(vec2 x, float y);
172 vec3 min(vec3 x, float y);
173 vec4 min(vec4 x, float y);
174 ivec2 min(ivec2 x, int y);
175 ivec3 min(ivec3 x, int y);
176 ivec4 min(ivec4 x, int y);
177 float max(float x, float y);
178 vec2 max(vec2 x, vec2 y);
179 vec3 max(vec3 x, vec3 y);
180 vec4 max(vec4 x, vec4 y);
181 int max(int x, int y);
182 ivec2 max(ivec2 x, ivec2 y);
183 ivec3 max(ivec3 x, ivec3 y);
184 ivec4 max(ivec4 x, ivec4 y);
185 vec2 max(vec2 x, float y);
186 vec3 max(vec3 x, float y);
187 vec4 max(vec4 x, float y);
188 ivec2 max(ivec2 x, int y);
189 ivec3 max(ivec3 x, int y);
190 ivec4 max(ivec4 x, int y);
191 float clamp(float x, float minVal, float maxVal);
192 vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);
193 vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);
194 vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);
195 int clamp(int x, int minVal, int maxVal);
196 ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);
197 ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);
198 ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);
199 vec2 clamp(vec2 x, float minVal, float maxVal);
200 vec3 clamp(vec3 x, float minVal, float maxVal);
201 vec4 clamp(vec4 x, float minVal, float maxVal);
202 ivec2 clamp(ivec2 x, int minVal, int maxVal);
203 ivec3 clamp(ivec3 x, int minVal, int maxVal);
204 ivec4 clamp(ivec4 x, int minVal, int maxVal);
205 float mix(float x, float y, float a);
206 vec2 mix(vec2 x, vec2 y, vec2 a);
207 vec3 mix(vec3 x, vec3 y, vec3 a);
208 vec4 mix(vec4 x, vec4 y, vec4 a);
209 vec2 mix(vec2 x, vec2 y, float a);
210 vec3 mix(vec3 x, vec3 y, float a);
211 vec4 mix(vec4 x, vec4 y, float a);
212 float step(float edge, float x);
213 vec2 step(vec2 edge, vec2 x);
214 vec3 step(vec3 edge, vec3 x);
215 vec4 step(vec4 edge, vec4 x);
216 vec2 step(float edge, vec2 x);
217 vec3 step(float edge, vec3 x);
218 vec4 step(float edge, vec4 x);
219 float smoothstep(float edge0, float edge1, float x);
220 vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);
221 vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);
222 vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);
223 vec2 smoothstep(float edge0, float edge1, vec2 x);
224 vec3 smoothstep(float edge0, float edge1, vec3 x);
225 vec4 smoothstep(float edge0, float edge1, vec4 x);
226 float fma(float a, float b, float c);
227 vec2 fma(vec2 a, vec2 b, vec2 c);
228 vec3 fma(vec3 a, vec3 b, vec3 c);
229 vec4 fma(vec4 a, vec4 b, vec4 c);
230 float length(float x);
231 float length(vec2 x);
232 float length(vec3 x);
233 float length(vec4 x);
234 float distance(float p0, float p1);
235 float distance(vec2 p0, vec2 p1);
236 float distance(vec3 p0, vec3 p1);
237 float distance(vec4 p0, vec4 p1);
238 float dot(float x, float y);
239 float dot(vec2 x, vec2 y);
240 float dot(vec3 x, vec3 y);
241 float dot(vec4 x, vec4 y);
243 float normalize(float x);
244 vec2 normalize(vec2 x);
245 vec3 normalize(vec3 x);
246 vec4 normalize(vec4 x);
247 float faceforward(float N, float I, float Nref);
248 vec2 faceforward(vec2 N, vec2 I, vec2 Nref);
249 vec3 faceforward(vec3 N, vec3 I, vec3 Nref);
250 vec4 faceforward(vec4 N, vec4 I, vec4 Nref);
251 float reflect(float N, float I);
252 vec2 reflect(vec2 N, vec2 I);
253 vec3 reflect(vec3 N, vec3 I);
254 vec4 reflect(vec4 N, vec4 I);
255 float refract(float N, float I, float eta);
256 vec2 refract(vec2 N, vec2 I, float eta);
257 vec3 refract(vec3 N, vec3 I, float eta);
258 vec4 refract(vec4 N, vec4 I, float eta);
259 mat2 matrixCompMult(mat2 x, mat2 y);
260 mat3 matrixCompMult(mat3 x, mat3 y);
261 mat4 matrixCompMult(mat4 x, mat4 y);
262 mat2x3 matrixCompMult(mat2x3 x, mat2x3 y);
263 mat3x2 matrixCompMult(mat3x2 x, mat3x2 y);
264 mat2x4 matrixCompMult(mat2x4 x, mat2x4 y);
265 mat4x2 matrixCompMult(mat4x2 x, mat4x2 y);
266 mat3x4 matrixCompMult(mat3x4 x, mat3x4 y);
267 mat4x3 matrixCompMult(mat4x3 x, mat4x3 y);
268 mat2 transpose(mat2 m);
269 mat3 transpose(mat3 m);
270 mat4 transpose(mat4 m);
271 mat2 determinant(mat2 m);
272 mat3 determinant(mat3 m);
273 mat4 determinant(mat4 m);
274 mat2 inverse(mat2 m);
275 mat3 inverse(mat3 m);
276 mat4 inverse(mat4 m);
277 int textureSize(sampler1D sampler, int lod);
278 ivec2 textureSize(sampler2D sampler, int lod);
279 ivec3 textureSize(sampler3D sampler, int lod);
280 ivec2 textureSize(sampler1DArray sampler, int lod);
281 ivec3 textureSize(sampler2DArray sampler, int lod);
282 ivec2 textureSize(samplerCube sampler, int lod);
283 ivec3 textureSize(samplerCubeArray sampler, int lod);
284 int textureSize(sampler1DShadow sampler, int lod);
285 ivec2 textureSize(sampler2DShadow sampler, int lod);
286 ivec2 textureSize(samplerCubeShadow sampler, int lod);
287 ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
288 ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
289 ivec3 textureSize(samplerCubeArrayShadow sampler, int lod);
290 vec4 texture(sampler1D sampler, float P);
291 vec4 texture(sampler2D sampler, vec2 P);
292 vec4 texture(sampler3D sampler, vec3 P);
293 vec4 texture(sampler1DArray sampler, vec2 P);
294 vec4 texture(sampler2DArray sampler, vec3 P);
295 vec4 texture(samplerCube sampler, vec3 P);
296 vec4 texture(samplerCubeArray sampler, vec4 P);
297 float texture(sampler1DShadow sampler, vec3 P);
298 float texture(sampler2DShadow sampler, vec3 P);
299 float texture(samplerCubeShadow sampler, vec4 P);
300 float texture(sampler1DArrayShadow sampler, vec3 P);
301 float texture(sampler2DArrayShadow sampler, vec4 P);
302 float texture(samplerCubeArrayShadow sampler, vec4 P, float compare);
303 vec4 textureLod(sampler1D sampler, float P);
304 vec4 textureLod(sampler2D sampler, vec2 P);
305 vec4 textureLod(sampler3D sampler, vec3 P);
306 vec4 textureLod(sampler1DArray sampler, vec2 P);
307 vec4 textureLod(sampler2DArray sampler, vec3 P);
308 vec4 textureLod(samplerCube sampler, vec3 P);
309 vec4 textureLod(samplerCubeArray sampler, vec4 P);
310 vec4 texelFetch(sampler1D sampler, int P, int lod);
311 vec4 texelFetch(sampler2D sampler, ivec2 P, int lod);
312 vec4 texelFetch(sampler3D sampler, ivec3 P, int lod);
313 vec4 texelFetch(sampler1DArray sampler, ivec2 P, int lod);
314 vec4 texelFetch(sampler2DArray sampler, ivec3 P, int lod);
315 // END BUILTIN FUNCTIONS
317 #pragma MSP stage(vertex)
321 float gl_ClipDistance[];
324 #pragma MSP stage(geometry)
328 float gl_ClipDistance[];
333 float gl_ClipDistance[];