vec2 mod(vec2 x, vec2 y);
vec3 mod(vec3 x, vec3 y);
vec4 mod(vec4 x, vec4 y);
-vec2 mod(vec2 x, float y);
-vec3 mod(vec3 x, float y);
-vec4 mod(vec4 x, float y);
-float modf(float x, out float y);
-vec2 modf(vec2 x, out vec2 y);
-vec3 modf(vec3 x, out vec3 y);
-vec4 modf(vec4 x, out vec4 y);
+vec2 mod(vec2 x, float y) { return mod(x, vec2(y)); }
+vec3 mod(vec3 x, float y) { return mod(x, vec3(y)); }
+vec4 mod(vec4 x, float y) { return mod(x, vec4(y)); }
float min(float x, float y);
vec2 min(vec2 x, vec2 y);
vec3 min(vec3 x, vec3 y);
ivec2 min(ivec2 x, ivec2 y);
ivec3 min(ivec3 x, ivec3 y);
ivec4 min(ivec4 x, ivec4 y);
-vec2 min(vec2 x, float y);
-vec3 min(vec3 x, float y);
-vec4 min(vec4 x, float y);
-ivec2 min(ivec2 x, int y);
-ivec3 min(ivec3 x, int y);
-ivec4 min(ivec4 x, int y);
+vec2 min(vec2 x, float y) { return min(x, vec2(y)); }
+vec3 min(vec3 x, float y) { return min(x, vec3(y)); }
+vec4 min(vec4 x, float y) { return min(x, vec4(y)); }
+ivec2 min(ivec2 x, int y) { return min(x, ivec2(y)); }
+ivec3 min(ivec3 x, int y) { return min(x, ivec3(y)); }
+ivec4 min(ivec4 x, int y) { return min(x, ivec4(y)); }
float max(float x, float y);
vec2 max(vec2 x, vec2 y);
vec3 max(vec3 x, vec3 y);
ivec2 max(ivec2 x, ivec2 y);
ivec3 max(ivec3 x, ivec3 y);
ivec4 max(ivec4 x, ivec4 y);
-vec2 max(vec2 x, float y);
-vec3 max(vec3 x, float y);
-vec4 max(vec4 x, float y);
-ivec2 max(ivec2 x, int y);
-ivec3 max(ivec3 x, int y);
-ivec4 max(ivec4 x, int y);
+vec2 max(vec2 x, float y) { return max(x, vec2(y)); }
+vec3 max(vec3 x, float y) { return max(x, vec3(y)); }
+vec4 max(vec4 x, float y) { return max(x, vec4(y)); }
+ivec2 max(ivec2 x, int y) { return max(x, ivec2(y)); }
+ivec3 max(ivec3 x, int y) { return max(x, ivec3(y)); }
+ivec4 max(ivec4 x, int y) { return max(x, ivec4(y)); }
float clamp(float x, float minVal, float maxVal);
vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);
vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);
ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);
ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);
ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);
-vec2 clamp(vec2 x, float minVal, float maxVal);
-vec3 clamp(vec3 x, float minVal, float maxVal);
-vec4 clamp(vec4 x, float minVal, float maxVal);
-ivec2 clamp(ivec2 x, int minVal, int maxVal);
-ivec3 clamp(ivec3 x, int minVal, int maxVal);
-ivec4 clamp(ivec4 x, int minVal, int maxVal);
+vec2 clamp(vec2 x, float minVal, float maxVal) { return clamp(x, vec2(minVal), vec2(maxVal)); }
+vec3 clamp(vec3 x, float minVal, float maxVal) { return clamp(x, vec3(minVal), vec3(maxVal)); }
+vec4 clamp(vec4 x, float minVal, float maxVal) { return clamp(x, vec4(minVal), vec4(maxVal)); }
+ivec2 clamp(ivec2 x, int minVal, int maxVal) { return clamp(x, ivec2(minVal), ivec2(maxVal)); }
+ivec3 clamp(ivec3 x, int minVal, int maxVal) { return clamp(x, ivec3(minVal), ivec3(maxVal)); }
+ivec4 clamp(ivec4 x, int minVal, int maxVal) { return clamp(x, ivec4(minVal), ivec4(maxVal)); }
float mix(float x, float y, float a);
vec2 mix(vec2 x, vec2 y, vec2 a);
vec3 mix(vec3 x, vec3 y, vec3 a);
vec4 mix(vec4 x, vec4 y, vec4 a);
-vec2 mix(vec2 x, vec2 y, float a);
-vec3 mix(vec3 x, vec3 y, float a);
-vec4 mix(vec4 x, vec4 y, float a);
+float mix(float x, float y, float a) { return mix(x, y, float(a)); }
+vec2 mix(vec2 x, vec2 y, float a) { return mix(x, y, vec2(a)); }
+vec3 mix(vec3 x, vec3 y, float a) { return mix(x, y, vec3(a)); }
+vec4 mix(vec4 x, vec4 y, float a) { return mix(x, y, vec4(a)); }
float mix(float x, float y, bool a);
vec2 mix(vec2 x, vec2 y, bvec2 a);
vec3 mix(vec3 x, vec3 y, bvec3 a);
vec2 step(vec2 edge, vec2 x);
vec3 step(vec3 edge, vec3 x);
vec4 step(vec4 edge, vec4 x);
-vec2 step(float edge, vec2 x);
-vec3 step(float edge, vec3 x);
-vec4 step(float edge, vec4 x);
+vec2 step(float edge, vec2 x) { return step(vec2(edge), x); }
+vec3 step(float edge, vec3 x) { return step(vec3(edge), x); }
+vec4 step(float edge, vec4 x) { return step(vec4(edge), x); }
float smoothstep(float edge0, float edge1, float x);
vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);
vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);
vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);
-vec2 smoothstep(float edge0, float edge1, vec2 x);
-vec3 smoothstep(float edge0, float edge1, vec3 x);
-vec4 smoothstep(float edge0, float edge1, vec4 x);
+vec2 smoothstep(float edge0, float edge1, vec2 x) { return smoothstep(vec2(edge0), vec2(edge1), x); }
+vec3 smoothstep(float edge0, float edge1, vec3 x) { return smoothstep(vec3(edge0), vec3(edge1), x); }
+vec4 smoothstep(float edge0, float edge1, vec4 x) { return smoothstep(vec4(edge0), vec4(edge1), x); }
bool isnan(float x);
bvec2 isnan(vec2 x);
bvec3 isnan(vec3 x);
bvec2 isinf(vec2 x);
bvec3 isinf(vec3 x);
bvec4 isinf(vec4 x);
-int floatBitsToInt(float value);
-ivec2 floatBitsToInt(vec2 value);
-ivec3 floatBitsToInt(vec3 value);
-ivec4 floatBitsToInt(vec4 value);
-float intBitsToFloat(int value);
-vec2 intBitsToFloat(ivec2 value);
-vec3 intBitsToFloat(ivec3 value);
-vec4 intBitsToFloat(ivec4 value);
float fma(float a, float b, float c);
vec2 fma(vec2 a, vec2 b, vec2 c);
vec3 fma(vec3 a, vec3 b, vec3 c);
vec4 fma(vec4 a, vec4 b, vec4 c);
-float frexp(float x, out int exp);
-vec2 frexp(vec2 x, out ivec2 exp);
-vec3 frexp(vec3 x, out ivec3 exp);
-vec4 frexp(vec4 x, out ivec4 exp);
-float ldexp(float x, int exp);
-vec2 ldexp(vec2 x, ivec2 exp);
-vec3 ldexp(vec3 x, ivec3 exp);
-vec4 ldexp(vec4 x, ivec4 exp);
float length(float x);
float length(vec2 x);
float length(vec3 x);
float dot(vec2 x, vec2 y);
float dot(vec3 x, vec3 y);
float dot(vec4 x, vec4 y);
-vec3 cross(vec3 x);
+vec3 cross(vec3 x, vec3 y);
float normalize(float x);
vec2 normalize(vec2 x);
vec3 normalize(vec3 x);
vec2 faceforward(vec2 N, vec2 I, vec2 Nref);
vec3 faceforward(vec3 N, vec3 I, vec3 Nref);
vec4 faceforward(vec4 N, vec4 I, vec4 Nref);
-float reflect(float N, float I);
-vec2 reflect(vec2 N, vec2 I);
-vec3 reflect(vec3 N, vec3 I);
-vec4 reflect(vec4 N, vec4 I);
-float refract(float N, float I, float eta);
-vec2 refract(vec2 N, vec2 I, float eta);
-vec3 refract(vec3 N, vec3 I, float eta);
-vec4 refract(vec4 N, vec4 I, float eta);
+float reflect(float I, float N);
+vec2 reflect(vec2 I, vec2 N);
+vec3 reflect(vec3 I, vec3 N);
+vec4 reflect(vec4 I, vec4 N);
+float refract(float I, float N, float eta);
+vec2 refract(vec2 I, vec2 N, float eta);
+vec3 refract(vec3 I, vec3 N, float eta);
+vec4 refract(vec4 I, vec4 N, float eta);
mat2 matrixCompMult(mat2 x, mat2 y);
mat3 matrixCompMult(mat3 x, mat3 y);
mat4 matrixCompMult(mat4 x, mat4 y);
bool not(bvec2 x);
bool not(bvec3 x);
bool not(bvec4 x);
-void imulExtended(int x, int y, out int msb, out int lsb);
-void imulExtended(ivec2 x, ivec2 y, out ivec2 msb, out ivec2 lsb);
-void imulExtended(ivec3 x, ivec3 y, out ivec3 msb, out ivec3 lsb);
-void imulExtended(ivec4 x, ivec4 y, out ivec4 msb, out ivec4 lsb);
int bitfieldExtract(int value, int offset, int bits);
ivec2 bitfieldExtract(ivec2 value, int offset, int bits);
ivec3 bitfieldExtract(ivec3 value, int offset, int bits);
float texture(sampler1DArrayShadow sampler, vec3 P);
float texture(sampler2DArrayShadow sampler, vec4 P);
float texture(samplerCubeArrayShadow sampler, vec4 P, float compare);
-vec4 textureLod(sampler1D sampler, float P);
-vec4 textureLod(sampler2D sampler, vec2 P);
-vec4 textureLod(sampler3D sampler, vec3 P);
-vec4 textureLod(sampler1DArray sampler, vec2 P);
-vec4 textureLod(sampler2DArray sampler, vec3 P);
-vec4 textureLod(samplerCube sampler, vec3 P);
-vec4 textureLod(samplerCubeArray sampler, vec4 P);
+vec4 textureLod(sampler1D sampler, float P, float lod);
+vec4 textureLod(sampler2D sampler, vec2 P, float lod);
+vec4 textureLod(sampler3D sampler, vec3 P, float lod);
+vec4 textureLod(sampler1DArray sampler, vec2 P, float lod);
+vec4 textureLod(sampler2DArray sampler, vec3 P, float lod);
+vec4 textureLod(samplerCube sampler, vec3 P, float lod);
+vec4 textureLod(samplerCubeArray sampler, vec4 P, float lod);
vec4 texelFetch(sampler1D sampler, int P, int lod);
vec4 texelFetch(sampler2D sampler, ivec2 P, int lod);
vec4 texelFetch(sampler3D sampler, ivec3 P, int lod);
float gl_ClipDistance[];
} gl_in[];
in int gl_PrimitiveIDIn;
+in int gl_InvocationID;
out gl_PerVertex
{
vec4 gl_Position;