glslx 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/glslx +76 -76
- package/package.json +1 -1
package/glslx
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(){var ch=Object.create||function(a){return{__proto__:a}};function rh(a,b){a.prototype=ch(b.prototype),a.prototype.constructor=a}var sh=Math.imul||function(a,b){return (a*(b>>>16)<<16)+a*(b&65535)|0};var $e;function th(a){return typeof a==='string'}function uh(a){return a===null?a:a+''}function Ye(c,a,b){return c.a=a,c.b=b,c.c=a.length,c}function Ze(c){if(c.b>=c.c)return-1;var a=c.a.charCodeAt((c.b=c.b+1|0)-1|0);if(a&64512^55296)return a;if(c.b>=c.c)return-1;var b=c.a.charCodeAt((c.b=c.b+1|0)-1|0);return ((a<<10)+b|0)-56613888|0}function
|
|
3
|
-
e+='\n';for(var
|
|
4
|
-
i+='\n';for(var Ta=0,la=Array.from(v.b.keys()),rb=la.length;Ta<rb;Ta=Ta+1|0){var k=la[Ta];i+='const GLSLX_NAME_'+k.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+' = '+JSON.stringify(v.b.get(k))+'\n'}}return i}break;case 4:if(v.a){for(var p='',La=0,Ua=v.a,wa=Ua.length;La<wa;La=La+1|0){var t=Ua[La];p+='pub static GLSLX_SOURCE_'+t.a.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+': &str = '+JSON.stringify(t.b)+';\n'}if(v.b&&Array.from(v.b.keys()).length){p+='\n';for(var xa=0,bb=Array.from(v.b.keys()),Ia=bb.length;xa<Ia;xa=xa+1|0){var w=bb[xa];p+='pub static GLSLX_NAME_'+w.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+': &str = '+JSON.stringify(v.b.get(w))+';\n'}}return p}break}return null}function cf(a,b,c){if(a.d)return null;b.unshift(new Zh('<api>',"\nimport {\n // The variable `gl_Position` is available only in the vertex language and is intended for writing the\n // homogeneous vertex position. This value will be used by primitive assembly, clipping, culling, and other\n // fixed functionality operations that operate on primitives after vertex processing has occurred.\n //\n // All executions of a well-formed vertex shader should write a value into this variable. It can be\n // written at any time during shader execution. It may also be read back by the shader after being written.\n // Compilers may generate a diagnostic message if they detect `gl_Position` is not written, or read before\n // being written, but not all such cases are detectable. The value of `gl_Position` is undefined if a vertex\n // shader is executed and does not write `gl_Position`.\n highp vec4 gl_Position;\n\n // The variable `gl_PointSize` is available only in the vertex language and is intended for\n // a vertex shader to write the size of the point to be rasterized. It is measured in pixels.\n mediump float gl_PointSize;\n\n const int gl_MaxVertexAttribs;\n const int gl_MaxVertexUniformVectors;\n const int gl_MaxVaryingVectors;\n const int gl_MaxVertexTextureImageUnits;\n const int gl_MaxCombinedTextureImageUnits;\n const int gl_MaxTextureImageUnits;\n const int gl_MaxFragmentUniformVectors;\n const int gl_MaxDrawBuffers;\n\n // The fragment shader has access to the read-only built-in variable `gl_FrontFacing` whose value is `true` if\n // the fragment belongs to a front-facing primitive. One use of this is to emulate two-sided lighting by\n // selecting one of two colors calculated by the vertex shader.\n const bool gl_FrontFacing;\n\n // The fragment shader has access to the read-only built-in variable `gl_PointCoord`. The values in\n // `gl_PointCoord` are two-dimensional coordinates indicating where within a point primitive the current\n // fragment is located. They range from 0.0 to 1.0 across the point. If the current primitive is not a\n // point, then the values read from `gl_PointCoord` are undefined.\n const mediump vec2 gl_PointCoord;\n\n // The variable `gl_FragCoord` is available as a read-only variable from within fragment shaders and it holds\n // the window relative coordinates `x`, `y`, `z`, and `1/w` values for the fragment. This value is the result\n // of the fixed functionality that interpolates primitives after vertex processing to generate fragments. The `z`\n // component is the depth value that will be used for the fragment's depth.\n const mediump vec4 gl_FragCoord;\n\n // Writing to `gl_FragColor` specifies the fragment color that will be used by the subsequent fixed\n // functionality pipeline.\n //\n // If subsequent fixed functionality consumes fragment color and an execution of a fragment shader\n // does not write a value to `gl_FragColor` then the fragment color consumed is undefined.\n mediump vec4 gl_FragColor;\n\n // The variable `gl_FragData` is an array. Writing to `gl_FragData[n]` specifies the fragment data that will be\n // used by the subsequent fixed functionality pipeline for data `n`.\n //\n // If subsequent fixed functionality consumes fragment data and an execution of a fragment shader does not write\n // a value to it, then the fragment data consumed is undefined.\n mediump vec4 gl_FragData[gl_MaxDrawBuffers];\n\n // Depth range in window coordinates\n struct gl_DepthRangeParameters {\n float near;\n float far;\n // Equal to `far - near`\n float diff;\n };\n\n uniform gl_DepthRangeParameters gl_DepthRange;\n\n ////////////////////////////////////////////////////////////////////////////////\n // Angle and Trigonometry Functions\n\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n float radians(float degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec2 radians(vec2 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec3 radians(vec3 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec4 radians(vec4 degrees);\n\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n float degrees(float radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec2 degrees(vec2 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec3 degrees(vec3 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec4 degrees(vec4 radians);\n\n // The standard trigonometric sine function.\n float sin(float angle);\n // The standard trigonometric sine function.\n vec2 sin(vec2 angle);\n // The standard trigonometric sine function.\n vec3 sin(vec3 angle);\n // The standard trigonometric sine function.\n vec4 sin(vec4 angle);\n\n // The standard trigonometric cosine function.\n float cos(float angle);\n // The standard trigonometric cosine function.\n vec2 cos(vec2 angle);\n // The standard trigonometric cosine function.\n vec3 cos(vec3 angle);\n // The standard trigonometric cosine function.\n vec4 cos(vec4 angle);\n\n // The standard trigonometric tangent.\n float tan(float angle);\n // The standard trigonometric tangent.\n vec2 tan(vec2 angle);\n // The standard trigonometric tangent.\n vec3 tan(vec3 angle);\n // The standard trigonometric tangent.\n vec4 tan(vec4 angle);\n\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n float asin(float x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec2 asin(vec2 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec3 asin(vec3 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec4 asin(vec4 x);\n\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n float acos(float x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec2 acos(vec2 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec3 acos(vec3 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec4 acos(vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n float atan(float y, float x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec2 atan(vec2 y, vec2 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec3 atan(vec3 y, vec3 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec4 atan(vec4 y, vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n float atan(float y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec2 atan(vec2 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec3 atan(vec3 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec4 atan(vec4 y_over_x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Exponential Functions\n\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n float pow(float x, float y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec2 pow(vec2 x, vec2 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec3 pow(vec3 x, vec3 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec4 pow(vec4 x, vec4 y);\n\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n float exp(float x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec2 exp(vec2 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec3 exp(vec3 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec4 exp(vec4 x);\n\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n float log(float x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec2 log(vec2 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec3 log(vec3 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec4 log(vec4 x);\n\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n float exp2(float x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec2 exp2(vec2 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec3 exp2(vec3 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec4 exp2(vec4 x);\n\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n float log2(float x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec2 log2(vec2 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec3 log2(vec3 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec4 log2(vec4 x);\n\n // Returns `√x`. Results are undefined if `x < 0`.\n float sqrt(float x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec2 sqrt(vec2 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec3 sqrt(vec3 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec4 sqrt(vec4 x);\n\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n float inversesqrt(float x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec2 inversesqrt(vec2 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec3 inversesqrt(vec3 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec4 inversesqrt(vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Common Functions\n\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n float abs(float x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec2 abs(vec2 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec3 abs(vec3 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec4 abs(vec4 x);\n\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n float sign(float x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec2 sign(vec2 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec3 sign(vec3 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec4 sign(vec4 x);\n\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n float floor(float x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec2 floor(vec2 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec3 floor(vec3 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec4 floor(vec4 x);\n\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n float ceil(float x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec2 ceil(vec2 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec3 ceil(vec3 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec4 ceil(vec4 x);\n\n // Returns `x - floor(x)`\n float fract(float x);\n // Returns `x - floor(x)`\n vec2 fract(vec2 x);\n // Returns `x - floor(x)`\n vec3 fract(vec3 x);\n // Returns `x - floor(x)`\n vec4 fract(vec4 x);\n\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n float mod(float x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, float y);\n\n // Modulus. Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, vec2 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, vec3 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, vec4 y);\n\n // Returns `y` if `y < x`, otherwise it returns `x`\n float min(float x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, vec2 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, vec3 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, vec4 y);\n\n // Returns `y` if `x < y`, otherwise it returns `x`\n float max(float x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, vec2 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, vec3 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, vec4 y);\n\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n float clamp(float x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);\n\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n float mix(float x, float y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, vec2 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, vec3 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, vec4 a);\n\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n float step(float edge, float x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(float edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(vec2 edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(float edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(vec3 edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(float edge, vec4 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(vec4 edge, vec4 x);\n\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n float smoothstep(float edge0, float edge1, float x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(float edge0, float edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(float edge0, float edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(float edge0, float edge1, vec4 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Geometric Functions\n\n // Returns the length of vector `x`, i.e. `√x²`\n float length(float x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]²`\n float length(vec2 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]²`\n float length(vec3 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]² + x[3]²`\n float length(vec4 x);\n\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(float p0, float p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec2 p0, vec2 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec3 p0, vec3 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec4 p0, vec4 p1);\n\n // Returns the dot product of `x` and `y`, i.e. `x*y`\n float dot(float x, float y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1]`\n float dot(vec2 x, vec2 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2]`\n float dot(vec3 x, vec3 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3]`\n float dot(vec4 x, vec4 y);\n\n // Returns the cross product of `x` and `y`, i.e.\n //\n // ```glslx\n // vec3(\n // x[1]*y[2] - y[1]*x[2],\n // x[2]*y[0] - y[2]*x[0],\n // x[0]*y[1] - y[0]*x[1])\n // ```\n vec3 cross(vec3 x, vec3 y);\n\n // Returns a vector in the same direction as `x` but with a length of 1.\n float normalize(float x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec2 normalize(vec2 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec3 normalize(vec3 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec4 normalize(vec4 x);\n\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n float faceforward(float N, float I, float Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec2 faceforward(vec2 N, vec2 I, vec2 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec3 faceforward(vec3 N, vec3 I, vec3 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec4 faceforward(vec4 N, vec4 I, vec4 Nref);\n\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n float reflect(float I, float N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec2 reflect(vec2 I, vec2 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec3 reflect(vec3 I, vec3 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec4 reflect(vec4 I, vec4 N);\n\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return float(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n float refract(float I, float N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec2(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec2 refract(vec2 I, vec2 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec3(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec3 refract(vec3 I, vec3 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec4(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec4 refract(vec4 I, vec4 N, float eta);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Matrix Functions\n\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat2 matrixCompMult(mat2 x, mat2 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat3 matrixCompMult(mat3 x, mat3 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat4 matrixCompMult(mat4 x, mat4 y);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Vector Relational Functions\n\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(vec2 x, vec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(vec3 x, vec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(vec4 x, vec4 y);\n\n // Returns true if any component of `x` is `true`.\n bool any(bvec2 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec3 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec4 x);\n\n // Returns true only if all components of `x` are `true`.\n bool all(bvec2 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec3 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec4 x);\n\n // Returns the component-wise logical complement of `x`.\n bvec2 not(bvec2 x);\n // Returns the component-wise logical complement of `x`.\n bvec3 not(bvec3 x);\n // Returns the component-wise logical complement of `x`.\n bvec4 not(bvec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Texture Lookup Functions\n\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);\n\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);\n\n #extension GL_OES_standard_derivatives {\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdx(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdx(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdx(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdx(vec4 v);\n\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdy(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdy(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdy(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdy(vec4 v);\n\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n float fwidth(float v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec2 fwidth(vec2 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec3 fwidth(vec3 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec4 fwidth(vec4 v);\n }\n\n #extension GL_EXT_frag_depth {\n // Available only in the fragment language, `gl_FragDepthEXT` is an output variable that is used to establish the depth value for the current fragment.\n // If depth buffering is enabled and no shader writes to `gl_FragDepthEXT`, then the fixed function value for depth will be used (this value is contained\n // in the `z` component of `gl_FragCoord`) otherwise, the value written to `gl_FragDepthEXT` is used.\n //\n // If a shader statically assigns to `gl_FragDepthEXT`, then the value of the fragment's depth may be undefined for executions of the shader that take\n // that path. That is, if the set of linked fragment shaders statically contain a write to `gl_FragDepthEXT`, then it is responsible for always writing it.\n float gl_FragDepthEXT;\n }\n\n #extension GL_EXT_shader_texture_lod {\n vec4 texture2DGradEXT(sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DLodEXT(sampler2D sampler, vec2 coord, float lod);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec3 coord, float lod);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec4 coord, float lod);\n vec4 textureCubeGradEXT(samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);\n vec4 textureCubeLodEXT(samplerCube sampler, vec3 coord, float lod);\n }\n}\n"));
|
|
5
|
-
for(var n=0,k=b.length;n<k;n=n+1|0){var d=b[n];d.c=Lc(a,d,0)}for(var e=new Lh(0),f=new Xh(1,null),h=new wh(c.e),m=new Vh(a,h),l=[],p=0,t=b.length;p<t;p=p+1|0){var g=b[p],i=qd(a,g.c,e,h,f,m);bf(l,i.a)}return ud(m,e),new yh(e,l)}function Md(a,b,c){if(a.d)return null;b.unshift(new Zh('<api>',"\nimport {\n // The variable `gl_Position` is available only in the vertex language and is intended for writing the\n // homogeneous vertex position. This value will be used by primitive assembly, clipping, culling, and other\n // fixed functionality operations that operate on primitives after vertex processing has occurred.\n //\n // All executions of a well-formed vertex shader should write a value into this variable. It can be\n // written at any time during shader execution. It may also be read back by the shader after being written.\n // Compilers may generate a diagnostic message if they detect `gl_Position` is not written, or read before\n // being written, but not all such cases are detectable. The value of `gl_Position` is undefined if a vertex\n // shader is executed and does not write `gl_Position`.\n highp vec4 gl_Position;\n\n // The variable `gl_PointSize` is available only in the vertex language and is intended for\n // a vertex shader to write the size of the point to be rasterized. It is measured in pixels.\n mediump float gl_PointSize;\n\n const int gl_MaxVertexAttribs;\n const int gl_MaxVertexUniformVectors;\n const int gl_MaxVaryingVectors;\n const int gl_MaxVertexTextureImageUnits;\n const int gl_MaxCombinedTextureImageUnits;\n const int gl_MaxTextureImageUnits;\n const int gl_MaxFragmentUniformVectors;\n const int gl_MaxDrawBuffers;\n\n // The fragment shader has access to the read-only built-in variable `gl_FrontFacing` whose value is `true` if\n // the fragment belongs to a front-facing primitive. One use of this is to emulate two-sided lighting by\n // selecting one of two colors calculated by the vertex shader.\n const bool gl_FrontFacing;\n\n // The fragment shader has access to the read-only built-in variable `gl_PointCoord`. The values in\n // `gl_PointCoord` are two-dimensional coordinates indicating where within a point primitive the current\n // fragment is located. They range from 0.0 to 1.0 across the point. If the current primitive is not a\n // point, then the values read from `gl_PointCoord` are undefined.\n const mediump vec2 gl_PointCoord;\n\n // The variable `gl_FragCoord` is available as a read-only variable from within fragment shaders and it holds\n // the window relative coordinates `x`, `y`, `z`, and `1/w` values for the fragment. This value is the result\n // of the fixed functionality that interpolates primitives after vertex processing to generate fragments. The `z`\n // component is the depth value that will be used for the fragment's depth.\n const mediump vec4 gl_FragCoord;\n\n // Writing to `gl_FragColor` specifies the fragment color that will be used by the subsequent fixed\n // functionality pipeline.\n //\n // If subsequent fixed functionality consumes fragment color and an execution of a fragment shader\n // does not write a value to `gl_FragColor` then the fragment color consumed is undefined.\n mediump vec4 gl_FragColor;\n\n // The variable `gl_FragData` is an array. Writing to `gl_FragData[n]` specifies the fragment data that will be\n // used by the subsequent fixed functionality pipeline for data `n`.\n //\n // If subsequent fixed functionality consumes fragment data and an execution of a fragment shader does not write\n // a value to it, then the fragment data consumed is undefined.\n mediump vec4 gl_FragData[gl_MaxDrawBuffers];\n\n // Depth range in window coordinates\n struct gl_DepthRangeParameters {\n float near;\n float far;\n // Equal to `far - near`\n float diff;\n };\n\n uniform gl_DepthRangeParameters gl_DepthRange;\n\n ////////////////////////////////////////////////////////////////////////////////\n // Angle and Trigonometry Functions\n\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n float radians(float degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec2 radians(vec2 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec3 radians(vec3 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec4 radians(vec4 degrees);\n\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n float degrees(float radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec2 degrees(vec2 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec3 degrees(vec3 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec4 degrees(vec4 radians);\n\n // The standard trigonometric sine function.\n float sin(float angle);\n // The standard trigonometric sine function.\n vec2 sin(vec2 angle);\n // The standard trigonometric sine function.\n vec3 sin(vec3 angle);\n // The standard trigonometric sine function.\n vec4 sin(vec4 angle);\n\n // The standard trigonometric cosine function.\n float cos(float angle);\n // The standard trigonometric cosine function.\n vec2 cos(vec2 angle);\n // The standard trigonometric cosine function.\n vec3 cos(vec3 angle);\n // The standard trigonometric cosine function.\n vec4 cos(vec4 angle);\n\n // The standard trigonometric tangent.\n float tan(float angle);\n // The standard trigonometric tangent.\n vec2 tan(vec2 angle);\n // The standard trigonometric tangent.\n vec3 tan(vec3 angle);\n // The standard trigonometric tangent.\n vec4 tan(vec4 angle);\n\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n float asin(float x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec2 asin(vec2 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec3 asin(vec3 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec4 asin(vec4 x);\n\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n float acos(float x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec2 acos(vec2 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec3 acos(vec3 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec4 acos(vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n float atan(float y, float x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec2 atan(vec2 y, vec2 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec3 atan(vec3 y, vec3 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec4 atan(vec4 y, vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n float atan(float y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec2 atan(vec2 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec3 atan(vec3 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec4 atan(vec4 y_over_x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Exponential Functions\n\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n float pow(float x, float y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec2 pow(vec2 x, vec2 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec3 pow(vec3 x, vec3 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec4 pow(vec4 x, vec4 y);\n\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n float exp(float x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec2 exp(vec2 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec3 exp(vec3 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec4 exp(vec4 x);\n\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n float log(float x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec2 log(vec2 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec3 log(vec3 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec4 log(vec4 x);\n\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n float exp2(float x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec2 exp2(vec2 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec3 exp2(vec3 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec4 exp2(vec4 x);\n\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n float log2(float x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec2 log2(vec2 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec3 log2(vec3 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec4 log2(vec4 x);\n\n // Returns `√x`. Results are undefined if `x < 0`.\n float sqrt(float x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec2 sqrt(vec2 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec3 sqrt(vec3 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec4 sqrt(vec4 x);\n\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n float inversesqrt(float x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec2 inversesqrt(vec2 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec3 inversesqrt(vec3 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec4 inversesqrt(vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Common Functions\n\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n float abs(float x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec2 abs(vec2 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec3 abs(vec3 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec4 abs(vec4 x);\n\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n float sign(float x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec2 sign(vec2 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec3 sign(vec3 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec4 sign(vec4 x);\n\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n float floor(float x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec2 floor(vec2 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec3 floor(vec3 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec4 floor(vec4 x);\n\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n float ceil(float x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec2 ceil(vec2 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec3 ceil(vec3 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec4 ceil(vec4 x);\n\n // Returns `x - floor(x)`\n float fract(float x);\n // Returns `x - floor(x)`\n vec2 fract(vec2 x);\n // Returns `x - floor(x)`\n vec3 fract(vec3 x);\n // Returns `x - floor(x)`\n vec4 fract(vec4 x);\n\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n float mod(float x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, float y);\n\n // Modulus. Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, vec2 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, vec3 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, vec4 y);\n\n // Returns `y` if `y < x`, otherwise it returns `x`\n float min(float x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, vec2 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, vec3 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, vec4 y);\n\n // Returns `y` if `x < y`, otherwise it returns `x`\n float max(float x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, vec2 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, vec3 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, vec4 y);\n\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n float clamp(float x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);\n\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n float mix(float x, float y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, vec2 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, vec3 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, vec4 a);\n\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n float step(float edge, float x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(float edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(vec2 edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(float edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(vec3 edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(float edge, vec4 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(vec4 edge, vec4 x);\n\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n float smoothstep(float edge0, float edge1, float x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(float edge0, float edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(float edge0, float edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(float edge0, float edge1, vec4 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Geometric Functions\n\n // Returns the length of vector `x`, i.e. `√x²`\n float length(float x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]²`\n float length(vec2 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]²`\n float length(vec3 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]² + x[3]²`\n float length(vec4 x);\n\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(float p0, float p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec2 p0, vec2 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec3 p0, vec3 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec4 p0, vec4 p1);\n\n // Returns the dot product of `x` and `y`, i.e. `x*y`\n float dot(float x, float y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1]`\n float dot(vec2 x, vec2 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2]`\n float dot(vec3 x, vec3 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3]`\n float dot(vec4 x, vec4 y);\n\n // Returns the cross product of `x` and `y`, i.e.\n //\n // ```glslx\n // vec3(\n // x[1]*y[2] - y[1]*x[2],\n // x[2]*y[0] - y[2]*x[0],\n // x[0]*y[1] - y[0]*x[1])\n // ```\n vec3 cross(vec3 x, vec3 y);\n\n // Returns a vector in the same direction as `x` but with a length of 1.\n float normalize(float x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec2 normalize(vec2 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec3 normalize(vec3 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec4 normalize(vec4 x);\n\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n float faceforward(float N, float I, float Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec2 faceforward(vec2 N, vec2 I, vec2 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec3 faceforward(vec3 N, vec3 I, vec3 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec4 faceforward(vec4 N, vec4 I, vec4 Nref);\n\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n float reflect(float I, float N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec2 reflect(vec2 I, vec2 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec3 reflect(vec3 I, vec3 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec4 reflect(vec4 I, vec4 N);\n\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return float(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n float refract(float I, float N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec2(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec2 refract(vec2 I, vec2 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec3(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec3 refract(vec3 I, vec3 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec4(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec4 refract(vec4 I, vec4 N, float eta);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Matrix Functions\n\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat2 matrixCompMult(mat2 x, mat2 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat3 matrixCompMult(mat3 x, mat3 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat4 matrixCompMult(mat4 x, mat4 y);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Vector Relational Functions\n\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(vec2 x, vec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(vec3 x, vec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(vec4 x, vec4 y);\n\n // Returns true if any component of `x` is `true`.\n bool any(bvec2 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec3 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec4 x);\n\n // Returns true only if all components of `x` are `true`.\n bool all(bvec2 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec3 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec4 x);\n\n // Returns the component-wise logical complement of `x`.\n bvec2 not(bvec2 x);\n // Returns the component-wise logical complement of `x`.\n bvec3 not(bvec3 x);\n // Returns the component-wise logical complement of `x`.\n bvec4 not(bvec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Texture Lookup Functions\n\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);\n\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);\n\n #extension GL_OES_standard_derivatives {\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdx(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdx(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdx(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdx(vec4 v);\n\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdy(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdy(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdy(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdy(vec4 v);\n\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n float fwidth(float v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec2 fwidth(vec2 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec3 fwidth(vec3 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec4 fwidth(vec4 v);\n }\n\n #extension GL_EXT_frag_depth {\n // Available only in the fragment language, `gl_FragDepthEXT` is an output variable that is used to establish the depth value for the current fragment.\n // If depth buffering is enabled and no shader writes to `gl_FragDepthEXT`, then the fixed function value for depth will be used (this value is contained\n // in the `z` component of `gl_FragCoord`) otherwise, the value written to `gl_FragDepthEXT` is used.\n //\n // If a shader statically assigns to `gl_FragDepthEXT`, then the value of the fragment's depth may be undefined for executions of the shader that take\n // that path. That is, if the set of linked fragment shaders statically contain a write to `gl_FragDepthEXT`, then it is responsible for always writing it.\n float gl_FragDepthEXT;\n }\n\n #extension GL_EXT_shader_texture_lod {\n vec4 texture2DGradEXT(sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DLodEXT(sampler2D sampler, vec2 coord, float lod);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec3 coord, float lod);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec4 coord, float lod);\n vec4 textureCubeGradEXT(samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);\n vec4 textureCubeLodEXT(samplerCube sampler, vec3 coord, float lod);\n }\n}\n"));
|
|
6
|
-
for(var O=0,
|
|
7
|
-
!1)}function
|
|
8
|
-
i.a+=i.b+'}'}break;case 4:i.a+='break;';break;case 5:i.a+='continue;';break;case 6:i.a+='discard;';break;case 7:i.a+='do',cc(i,a.g,0),i.a+=i.c+i.b+'while'+i.d+'(',J(i,a.i,0),i.a+=');';break;case 8:J(i,a.g,0),i.a+=';';break;case 9:
|
|
9
|
-
a.g,0),i.a+=';';break;case 15:var e=a.g;i.a+='return',e&&(Vf(e.b)||(i.a+=' '),J(i,e,0)),i.a+=';';break;case 16:var f=a.e;i.a+=
|
|
10
|
-
J(c,a.g,16),c.a+='.',c.a+=a.e?a.e.c:a.
|
|
11
|
-
break;case 52:V(c,'=',a,b,2);break;case 53:V(c,'+=',a,b,2);break;case 54:V(c,'/=',a,b,2);break;case 55:V(c,'*=',a,b,2);break;case 56:V(c,'-=',a,b,2);break;default:c.a+=Wg[a.b];break}}function dc(f,a,b,c){var d=b.g,e=d.b;f.a+=a,(a.charCodeAt(0)==45&&(e==31||e==34||_f(d))||a.charCodeAt(0)==43&&(e==33||e==35))&&(f.a+=' '),J(f,d,14)}function
|
|
12
|
-
case 49:return qf(a);case 39:return
|
|
13
|
-
|
|
14
|
-
for(var i=0,n=0;n<f;n=n+1|0)i+=
|
|
15
|
-
else{if(a.length<d)return null;for(var t=0;t<d;t=t+1|0){var w=a[t];if(w.f!=e)return null;o(f,w)}}}else{var h=a[0];if(h.f!=e)return null;for(var
|
|
16
|
-
if(f&&h&&b.f==a.f){for(var
|
|
17
|
-
var c=G(a.g),d=G(a.i);if(c&&d){if(c.b==29&&d.b==29)return s(
|
|
18
|
-
return!1}function
|
|
19
|
-
return!0;case 4:case 9:case 10:case 11:case 12:case 15:case 17:case 32:case 43:return!
|
|
20
|
-
break;default:var
|
|
21
|
-
var
|
|
22
|
-
b))return!0;switch(a.b){case 23:if(
|
|
23
|
-
var b=e[d];
|
|
24
|
-
'keyword','break'),
|
|
25
|
-
l.reverse();for(var
|
|
26
|
-
return!0}break}return!1}function
|
|
27
|
-
b+=c.slice(d,e)}return b}function fe(a,b,c){if(!b)return a+': '+c+'\n';var d=sd(b,0);return rd(b)+': '+a+': '+c+'\n'+d.a+'\n'+d.b+'\n'}function Jf(c){for(var a=new ph,d=0,e=c.a,f=e.length;d<f;d=d+1|0){var b=e[d];a.a+=fe(b.a?'warning':'error',b.b,b.c),b.d&&(a.a+=fe('note',b.d,b.e))}return a.a}function u(c,a,b){(!c.e||c.e.b^a.b)&&(c.e=a,c.a.push(new Jh(0,a,b)),c.d=c.d+1|0)}function Kf(c,a,b){c.a.push(new Jh(1,a,b)),c.c=c.c+1|0}function
|
|
28
|
-
function Pf(e,a,b,c,d){u(e,a,'The constructor for type "'+
|
|
29
|
-
a,'No binary operator "'+b+'" for type "'+
|
|
30
|
-
b.k?b.k.n=a:b.
|
|
31
|
-
case 28:
|
|
32
|
-
function re(){return Ve=Ve+1|0,Ve}function
|
|
33
|
-
R(a,26,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var d=ve(a),e=od(a,2),f=null;if(e){if(f=
|
|
37
|
-
c),B(a,b.a))}function lg(a){var b=
|
|
38
|
-
if(!c&&z(a).b^96){var
|
|
39
|
-
else f=
|
|
40
|
-
case 18:c|=8;break;case 19:c|=16;break;case 25:c|=32;break;case 29:c|=64;break;case 30:c|=128;break;case 37:c|=256;break;case 38:c|=512;break;default:return c}(!b&&(d==2||d==37||d==38)||b==3&&d^25&&d^29&&d^16||b&&(d==18||d==30||d==19))&&u(a.a,z(a).a,'Cannot use this qualifier here'),
|
|
41
|
-
0),l=
|
|
42
|
-
c.a),'Multidimensional arrays are not a part of the language')}b.q=x(s(new Lh(26),Mg(b.q.f,d)),b.q.c)}return!0}function ze(a,b,c,d,e){for(var f=o(_(new Lh(17),d.h|a),b);;){var h=new Me(
|
|
43
|
-
function
|
|
44
|
-
d,b);return h&&c(d,e,f,h)}}function
|
|
45
|
-
c.b+b|0)}function Ce(a){return
|
|
46
|
-
var e=g
|
|
47
|
-
var d=i[g];
|
|
48
|
-
q.f=null);break;case 12:
|
|
49
|
-
b),
|
|
50
|
-
c.c,'Index "'+
|
|
51
|
-
return!1}),d.length^1&&(d=h,
|
|
52
|
-
a,'Invalid swizzle "'+c+'" on type "'+
|
|
53
|
-
a),c.d&&(
|
|
54
|
-
new Lh(3)):H(a,new Lh(25)),
|
|
55
|
-
new Lh(25)),y.a=!0),a.i.b^5){for(;a.i.g&&a.i.i.b==5;)r(a.i.i),y.a=!0}else
|
|
56
|
-
r(a.g))),y.a=!0;return}if(a.g.k.k&&
|
|
57
|
-
y.a=!0
|
|
58
|
-
|
|
59
|
-
break;case
|
|
60
|
-
|
|
61
|
-
return zb;case 4:return Ab}break}return null}function Bd(a){return a instanceof Me&&(a.v==0||a.v==2)}function
|
|
62
|
-
u(a,k,'Syntax error "'+g+'"');break}e.length^h&&(f=null,h=e.length),
|
|
63
|
-
return
|
|
64
|
-
d.a+'\n'),
|
|
65
|
-
break;case'--pretty-print':b.b=!1;break;case'--keep-symbols':b.d=!1;break;case'--help':case'-h':console.log("\nUsage: glslx [sources] [flags]\n\n --output=PATH\n Set the path to the output file. Defaults to standard out.\n\n --format=FORMAT\n Set the output format, must be json, js, c++, skew or rust. Defaults to json.\n\nAdvanced:\n\n --disable-rewriting\n Disable syntax tree rewriting, useful to check for driver bugs.\n\n --pretty-print\n Format the output nicely instead of minifying it.\n\n --renaming=MODE\n Valid modes are all, internal-only, or none. Defaults to all.\n\n --keep-symbols\n Don't inline constants or remove unused symbols.\n");
|
|
66
|
-
process.exit(1);break}else c.push(new Zh(h.resolve(i),f.readFileSync(i,'utf8')))}if(c.length){var p=new Kh,t=
|
|
67
|
-
function jd(a){return a>27&&a<31}function kd(a){return a>30&&a<38}function Vf(a){return a>30&&a<36}function ld(a){return a>33&&a<38}function
|
|
68
|
-
b=b+1|0);for(;b<d.length;)d.pop()}function
|
|
69
|
-
return{log:Jf(d),output:f?
|
|
70
|
-
|
|
71
|
-
for(var
|
|
72
|
-
this.a=!0,this.b=!0,this.c=0,this.d=!0,this.e=null}function wh(a){this.a=new Map,this.b=a,this.c=0}function xh(a,b){this.a=a,this.b=b}function yh(a,b){this.a=a,this.b=b}function zh(){this.a=[],this.b=[]}function Ah(a,b){this.a='',this.b='',this.c='\n',this.d=' ',this.e=b.b,this.e&&(this.d='',this.c='');for(var c=null,d=a.g;d;d=d.k)jf(this,d)||(c&&hf(c,d)&&(this.a+=this.c),
|
|
73
|
-
this.d=null,this.e=null,this.f=null,this.h=0,this.
|
|
74
|
-
this.
|
|
2
|
+
(function(){var ch=Object.create||function(a){return{__proto__:a}};function rh(a,b){a.prototype=ch(b.prototype),a.prototype.constructor=a}var sh=Math.imul||function(a,b){return (a*(b>>>16)<<16)+a*(b&65535)|0};var $e;function th(a){return typeof a==='string'}function uh(a){return a===null?a:a+''}function Ye(c,a,b){return c.a=a,c.b=b,c.c=a.length,c}function Ze(c){if(c.b>=c.c)return-1;var a=c.a.charCodeAt((c.b=c.b+1|0)-1|0);if(a&64512^55296)return a;if(c.b>=c.c)return-1;var b=c.a.charCodeAt((c.b=c.b+1|0)-1|0);return ((a<<10)+b|0)-56613888|0}function wc(a){return a.c=a.c+1|0,a.c}function Yc(v,a){switch(a){case 0:var b={};return Array.from(v.b.keys()).forEach(function(c){b[c]=v.b.get(c)}),JSON.stringify({shaders:v.a?v.a.map(function(d){return{name:d.a,contents:d.b}}):null,renaming:b},null,2)+'\n';case 1:if(v.a){for(var e='',q=0,K=v.a,C=K.length;q<C;q=q+1|0){var f=K[q];e+='export const GLSLX_SOURCE_'+f.a.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+' = '+JSON.stringify(f.b)+'\n'}if(v.b&&Array.from(v.b.keys()).length){
|
|
3
|
+
e+='\n';for(var F=0,O=Array.from(v.b.keys()),la=O.length;F<la;F=F+1|0){var h=O[F];e+='export const GLSLX_NAME_'+h.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+' = '+JSON.stringify(v.b.get(h))+'\n'}}return e}break;case 2:if(v.a){var l='';l+='#ifndef GLSLX_STRINGS_H\n',l+='#define GLSLX_STRINGS_H\n',l+='\n';for(var L=0,ha=v.a,ga=ha.length;L<ga;L=L+1|0){var m=ha[L];l+='static const char *GLSLX_SOURCE_'+m.a.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+' = '+JSON.stringify(m.b)+';\n'}if(l+='\n',v.b){for(var Z=0,ba=Array.from(v.b.keys()),sa=ba.length;Z<sa;Z=Z+1|0){var g=ba[Z];l+='static const char *GLSLX_NAME_'+g.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+' = '+JSON.stringify(v.b.get(g))+';\n'}l+='\n'}return l+='#endif\n',l}break;case 3:if(v.a){for(var i='',ca=0,ma=v.a,ya=ma.length;ca<ya;ca=ca+1|0){var n=ma[ca];i+='const GLSLX_SOURCE_'+n.a.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+' = '+JSON.stringify(n.b)+'\n'}if(v.b&&Array.from(v.b.keys()).length){
|
|
4
|
+
i+='\n';for(var La=0,ka=Array.from(v.b.keys()),cb=ka.length;La<cb;La=La+1|0){var k=ka[La];i+='const GLSLX_NAME_'+k.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+' = '+JSON.stringify(v.b.get(k))+'\n'}}return i}break;case 4:if(v.a){for(var p='',Ma=0,Ua=v.a,wa=Ua.length;Ma<wa;Ma=Ma+1|0){var t=Ua[Ma];p+='pub static GLSLX_SOURCE_'+t.a.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+': &str = '+JSON.stringify(t.b)+';\n'}if(v.b&&Array.from(v.b.keys()).length){p+='\n';for(var za=0,db=Array.from(v.b.keys()),Ja=db.length;za<Ja;za=za+1|0){var w=db[za];p+='pub static GLSLX_NAME_'+w.replace(new RegExp('([a-z0-9])([A-Z])','g'),'$1_$2').toUpperCase()+': &str = '+JSON.stringify(v.b.get(w))+';\n'}}return p}break}return null}function cf(a,b,c){if(a.d)return null;b.unshift(new Zh('<api>',"\nimport {\n // The variable `gl_Position` is available only in the vertex language and is intended for writing the\n // homogeneous vertex position. This value will be used by primitive assembly, clipping, culling, and other\n // fixed functionality operations that operate on primitives after vertex processing has occurred.\n //\n // All executions of a well-formed vertex shader should write a value into this variable. It can be\n // written at any time during shader execution. It may also be read back by the shader after being written.\n // Compilers may generate a diagnostic message if they detect `gl_Position` is not written, or read before\n // being written, but not all such cases are detectable. The value of `gl_Position` is undefined if a vertex\n // shader is executed and does not write `gl_Position`.\n highp vec4 gl_Position;\n\n // The variable `gl_PointSize` is available only in the vertex language and is intended for\n // a vertex shader to write the size of the point to be rasterized. It is measured in pixels.\n mediump float gl_PointSize;\n\n const int gl_MaxVertexAttribs;\n const int gl_MaxVertexUniformVectors;\n const int gl_MaxVaryingVectors;\n const int gl_MaxVertexTextureImageUnits;\n const int gl_MaxCombinedTextureImageUnits;\n const int gl_MaxTextureImageUnits;\n const int gl_MaxFragmentUniformVectors;\n const int gl_MaxDrawBuffers;\n\n // The fragment shader has access to the read-only built-in variable `gl_FrontFacing` whose value is `true` if\n // the fragment belongs to a front-facing primitive. One use of this is to emulate two-sided lighting by\n // selecting one of two colors calculated by the vertex shader.\n const bool gl_FrontFacing;\n\n // The fragment shader has access to the read-only built-in variable `gl_PointCoord`. The values in\n // `gl_PointCoord` are two-dimensional coordinates indicating where within a point primitive the current\n // fragment is located. They range from 0.0 to 1.0 across the point. If the current primitive is not a\n // point, then the values read from `gl_PointCoord` are undefined.\n const mediump vec2 gl_PointCoord;\n\n // The variable `gl_FragCoord` is available as a read-only variable from within fragment shaders and it holds\n // the window relative coordinates `x`, `y`, `z`, and `1/w` values for the fragment. This value is the result\n // of the fixed functionality that interpolates primitives after vertex processing to generate fragments. The `z`\n // component is the depth value that will be used for the fragment's depth.\n const mediump vec4 gl_FragCoord;\n\n // Writing to `gl_FragColor` specifies the fragment color that will be used by the subsequent fixed\n // functionality pipeline.\n //\n // If subsequent fixed functionality consumes fragment color and an execution of a fragment shader\n // does not write a value to `gl_FragColor` then the fragment color consumed is undefined.\n mediump vec4 gl_FragColor;\n\n // The variable `gl_FragData` is an array. Writing to `gl_FragData[n]` specifies the fragment data that will be\n // used by the subsequent fixed functionality pipeline for data `n`.\n //\n // If subsequent fixed functionality consumes fragment data and an execution of a fragment shader does not write\n // a value to it, then the fragment data consumed is undefined.\n mediump vec4 gl_FragData[gl_MaxDrawBuffers];\n\n // Depth range in window coordinates\n struct gl_DepthRangeParameters {\n float near;\n float far;\n // Equal to `far - near`\n float diff;\n };\n\n uniform gl_DepthRangeParameters gl_DepthRange;\n\n ////////////////////////////////////////////////////////////////////////////////\n // Angle and Trigonometry Functions\n\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n float radians(float degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec2 radians(vec2 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec3 radians(vec3 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec4 radians(vec4 degrees);\n\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n float degrees(float radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec2 degrees(vec2 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec3 degrees(vec3 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec4 degrees(vec4 radians);\n\n // The standard trigonometric sine function.\n float sin(float angle);\n // The standard trigonometric sine function.\n vec2 sin(vec2 angle);\n // The standard trigonometric sine function.\n vec3 sin(vec3 angle);\n // The standard trigonometric sine function.\n vec4 sin(vec4 angle);\n\n // The standard trigonometric cosine function.\n float cos(float angle);\n // The standard trigonometric cosine function.\n vec2 cos(vec2 angle);\n // The standard trigonometric cosine function.\n vec3 cos(vec3 angle);\n // The standard trigonometric cosine function.\n vec4 cos(vec4 angle);\n\n // The standard trigonometric tangent.\n float tan(float angle);\n // The standard trigonometric tangent.\n vec2 tan(vec2 angle);\n // The standard trigonometric tangent.\n vec3 tan(vec3 angle);\n // The standard trigonometric tangent.\n vec4 tan(vec4 angle);\n\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n float asin(float x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec2 asin(vec2 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec3 asin(vec3 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec4 asin(vec4 x);\n\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n float acos(float x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec2 acos(vec2 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec3 acos(vec3 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec4 acos(vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n float atan(float y, float x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec2 atan(vec2 y, vec2 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec3 atan(vec3 y, vec3 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec4 atan(vec4 y, vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n float atan(float y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec2 atan(vec2 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec3 atan(vec3 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec4 atan(vec4 y_over_x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Exponential Functions\n\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n float pow(float x, float y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec2 pow(vec2 x, vec2 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec3 pow(vec3 x, vec3 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec4 pow(vec4 x, vec4 y);\n\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n float exp(float x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec2 exp(vec2 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec3 exp(vec3 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec4 exp(vec4 x);\n\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n float log(float x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec2 log(vec2 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec3 log(vec3 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec4 log(vec4 x);\n\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n float exp2(float x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec2 exp2(vec2 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec3 exp2(vec3 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec4 exp2(vec4 x);\n\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n float log2(float x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec2 log2(vec2 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec3 log2(vec3 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec4 log2(vec4 x);\n\n // Returns `√x`. Results are undefined if `x < 0`.\n float sqrt(float x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec2 sqrt(vec2 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec3 sqrt(vec3 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec4 sqrt(vec4 x);\n\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n float inversesqrt(float x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec2 inversesqrt(vec2 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec3 inversesqrt(vec3 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec4 inversesqrt(vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Common Functions\n\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n float abs(float x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec2 abs(vec2 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec3 abs(vec3 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec4 abs(vec4 x);\n\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n float sign(float x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec2 sign(vec2 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec3 sign(vec3 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec4 sign(vec4 x);\n\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n float floor(float x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec2 floor(vec2 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec3 floor(vec3 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec4 floor(vec4 x);\n\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n float ceil(float x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec2 ceil(vec2 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec3 ceil(vec3 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec4 ceil(vec4 x);\n\n // Returns `x - floor(x)`\n float fract(float x);\n // Returns `x - floor(x)`\n vec2 fract(vec2 x);\n // Returns `x - floor(x)`\n vec3 fract(vec3 x);\n // Returns `x - floor(x)`\n vec4 fract(vec4 x);\n\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n float mod(float x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, float y);\n\n // Modulus. Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, vec2 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, vec3 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, vec4 y);\n\n // Returns `y` if `y < x`, otherwise it returns `x`\n float min(float x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, vec2 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, vec3 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, vec4 y);\n\n // Returns `y` if `x < y`, otherwise it returns `x`\n float max(float x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, vec2 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, vec3 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, vec4 y);\n\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n float clamp(float x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);\n\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n float mix(float x, float y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, vec2 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, vec3 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, vec4 a);\n\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n float step(float edge, float x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(float edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(vec2 edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(float edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(vec3 edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(float edge, vec4 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(vec4 edge, vec4 x);\n\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n float smoothstep(float edge0, float edge1, float x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(float edge0, float edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(float edge0, float edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(float edge0, float edge1, vec4 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Geometric Functions\n\n // Returns the length of vector `x`, i.e. `√x²`\n float length(float x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]²`\n float length(vec2 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]²`\n float length(vec3 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]² + x[3]²`\n float length(vec4 x);\n\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(float p0, float p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec2 p0, vec2 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec3 p0, vec3 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec4 p0, vec4 p1);\n\n // Returns the dot product of `x` and `y`, i.e. `x*y`\n float dot(float x, float y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1]`\n float dot(vec2 x, vec2 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2]`\n float dot(vec3 x, vec3 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3]`\n float dot(vec4 x, vec4 y);\n\n // Returns the cross product of `x` and `y`, i.e.\n //\n // ```glslx\n // vec3(\n // x[1]*y[2] - y[1]*x[2],\n // x[2]*y[0] - y[2]*x[0],\n // x[0]*y[1] - y[0]*x[1])\n // ```\n vec3 cross(vec3 x, vec3 y);\n\n // Returns a vector in the same direction as `x` but with a length of 1.\n float normalize(float x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec2 normalize(vec2 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec3 normalize(vec3 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec4 normalize(vec4 x);\n\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n float faceforward(float N, float I, float Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec2 faceforward(vec2 N, vec2 I, vec2 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec3 faceforward(vec3 N, vec3 I, vec3 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec4 faceforward(vec4 N, vec4 I, vec4 Nref);\n\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n float reflect(float I, float N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec2 reflect(vec2 I, vec2 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec3 reflect(vec3 I, vec3 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec4 reflect(vec4 I, vec4 N);\n\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return float(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n float refract(float I, float N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec2(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec2 refract(vec2 I, vec2 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec3(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec3 refract(vec3 I, vec3 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec4(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec4 refract(vec4 I, vec4 N, float eta);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Matrix Functions\n\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat2 matrixCompMult(mat2 x, mat2 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat3 matrixCompMult(mat3 x, mat3 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat4 matrixCompMult(mat4 x, mat4 y);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Vector Relational Functions\n\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(vec2 x, vec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(vec3 x, vec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(vec4 x, vec4 y);\n\n // Returns true if any component of `x` is `true`.\n bool any(bvec2 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec3 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec4 x);\n\n // Returns true only if all components of `x` are `true`.\n bool all(bvec2 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec3 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec4 x);\n\n // Returns the component-wise logical complement of `x`.\n bvec2 not(bvec2 x);\n // Returns the component-wise logical complement of `x`.\n bvec3 not(bvec3 x);\n // Returns the component-wise logical complement of `x`.\n bvec4 not(bvec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Texture Lookup Functions\n\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);\n\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);\n\n #extension GL_OES_standard_derivatives {\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdx(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdx(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdx(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdx(vec4 v);\n\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdy(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdy(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdy(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdy(vec4 v);\n\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n float fwidth(float v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec2 fwidth(vec2 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec3 fwidth(vec3 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec4 fwidth(vec4 v);\n }\n\n #extension GL_EXT_frag_depth {\n // Available only in the fragment language, `gl_FragDepthEXT` is an output variable that is used to establish the depth value for the current fragment.\n // If depth buffering is enabled and no shader writes to `gl_FragDepthEXT`, then the fixed function value for depth will be used (this value is contained\n // in the `z` component of `gl_FragCoord`) otherwise, the value written to `gl_FragDepthEXT` is used.\n //\n // If a shader statically assigns to `gl_FragDepthEXT`, then the value of the fragment's depth may be undefined for executions of the shader that take\n // that path. That is, if the set of linked fragment shaders statically contain a write to `gl_FragDepthEXT`, then it is responsible for always writing it.\n float gl_FragDepthEXT;\n }\n\n #extension GL_EXT_shader_texture_lod {\n vec4 texture2DGradEXT(sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DLodEXT(sampler2D sampler, vec2 coord, float lod);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec3 coord, float lod);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec4 coord, float lod);\n vec4 textureCubeGradEXT(samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);\n vec4 textureCubeLodEXT(samplerCube sampler, vec3 coord, float lod);\n }\n}\n"));
|
|
5
|
+
for(var n=0,k=b.length;n<k;n=n+1|0){var d=b[n];d.c=Nc(a,d,0)}for(var e=new Lh(0),f=new Xh(1,null),h=new wh(c.e),l=new Vh(a,h),m=[],p=0,t=b.length;p<t;p=p+1|0){var g=b[p],i=qd(a,g.c,e,h,f,l);bf(m,i.a)}return ud(l,e),new yh(e,m)}function Nd(a,b,c){if(a.d)return null;b.unshift(new Zh('<api>',"\nimport {\n // The variable `gl_Position` is available only in the vertex language and is intended for writing the\n // homogeneous vertex position. This value will be used by primitive assembly, clipping, culling, and other\n // fixed functionality operations that operate on primitives after vertex processing has occurred.\n //\n // All executions of a well-formed vertex shader should write a value into this variable. It can be\n // written at any time during shader execution. It may also be read back by the shader after being written.\n // Compilers may generate a diagnostic message if they detect `gl_Position` is not written, or read before\n // being written, but not all such cases are detectable. The value of `gl_Position` is undefined if a vertex\n // shader is executed and does not write `gl_Position`.\n highp vec4 gl_Position;\n\n // The variable `gl_PointSize` is available only in the vertex language and is intended for\n // a vertex shader to write the size of the point to be rasterized. It is measured in pixels.\n mediump float gl_PointSize;\n\n const int gl_MaxVertexAttribs;\n const int gl_MaxVertexUniformVectors;\n const int gl_MaxVaryingVectors;\n const int gl_MaxVertexTextureImageUnits;\n const int gl_MaxCombinedTextureImageUnits;\n const int gl_MaxTextureImageUnits;\n const int gl_MaxFragmentUniformVectors;\n const int gl_MaxDrawBuffers;\n\n // The fragment shader has access to the read-only built-in variable `gl_FrontFacing` whose value is `true` if\n // the fragment belongs to a front-facing primitive. One use of this is to emulate two-sided lighting by\n // selecting one of two colors calculated by the vertex shader.\n const bool gl_FrontFacing;\n\n // The fragment shader has access to the read-only built-in variable `gl_PointCoord`. The values in\n // `gl_PointCoord` are two-dimensional coordinates indicating where within a point primitive the current\n // fragment is located. They range from 0.0 to 1.0 across the point. If the current primitive is not a\n // point, then the values read from `gl_PointCoord` are undefined.\n const mediump vec2 gl_PointCoord;\n\n // The variable `gl_FragCoord` is available as a read-only variable from within fragment shaders and it holds\n // the window relative coordinates `x`, `y`, `z`, and `1/w` values for the fragment. This value is the result\n // of the fixed functionality that interpolates primitives after vertex processing to generate fragments. The `z`\n // component is the depth value that will be used for the fragment's depth.\n const mediump vec4 gl_FragCoord;\n\n // Writing to `gl_FragColor` specifies the fragment color that will be used by the subsequent fixed\n // functionality pipeline.\n //\n // If subsequent fixed functionality consumes fragment color and an execution of a fragment shader\n // does not write a value to `gl_FragColor` then the fragment color consumed is undefined.\n mediump vec4 gl_FragColor;\n\n // The variable `gl_FragData` is an array. Writing to `gl_FragData[n]` specifies the fragment data that will be\n // used by the subsequent fixed functionality pipeline for data `n`.\n //\n // If subsequent fixed functionality consumes fragment data and an execution of a fragment shader does not write\n // a value to it, then the fragment data consumed is undefined.\n mediump vec4 gl_FragData[gl_MaxDrawBuffers];\n\n // Depth range in window coordinates\n struct gl_DepthRangeParameters {\n float near;\n float far;\n // Equal to `far - near`\n float diff;\n };\n\n uniform gl_DepthRangeParameters gl_DepthRange;\n\n ////////////////////////////////////////////////////////////////////////////////\n // Angle and Trigonometry Functions\n\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n float radians(float degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec2 radians(vec2 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec3 radians(vec3 degrees);\n // Converts `degrees` to radians, i.e. `π / 180 * degrees`\n vec4 radians(vec4 degrees);\n\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n float degrees(float radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec2 degrees(vec2 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec3 degrees(vec3 radians);\n // Converts `radians` to degrees, i.e. `180 / π * radians`\n vec4 degrees(vec4 radians);\n\n // The standard trigonometric sine function.\n float sin(float angle);\n // The standard trigonometric sine function.\n vec2 sin(vec2 angle);\n // The standard trigonometric sine function.\n vec3 sin(vec3 angle);\n // The standard trigonometric sine function.\n vec4 sin(vec4 angle);\n\n // The standard trigonometric cosine function.\n float cos(float angle);\n // The standard trigonometric cosine function.\n vec2 cos(vec2 angle);\n // The standard trigonometric cosine function.\n vec3 cos(vec3 angle);\n // The standard trigonometric cosine function.\n vec4 cos(vec4 angle);\n\n // The standard trigonometric tangent.\n float tan(float angle);\n // The standard trigonometric tangent.\n vec2 tan(vec2 angle);\n // The standard trigonometric tangent.\n vec3 tan(vec3 angle);\n // The standard trigonometric tangent.\n vec4 tan(vec4 angle);\n\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n float asin(float x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec2 asin(vec2 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec3 asin(vec3 x);\n // Arc sine. Returns an angle whose sine is `x`. The range of values returned by this function is `[-π/2, π/2]`. Results are undefined if `∣x∣>1`.\n vec4 asin(vec4 x);\n\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n float acos(float x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec2 acos(vec2 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec3 acos(vec3 x);\n // Arc cosine. Returns an angle whose cosine is `x`. The range of values returned by this function is `[0, π]`. Results are undefined if `∣x∣>1`.\n vec4 acos(vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n float atan(float y, float x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec2 atan(vec2 y, vec2 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec3 atan(vec3 y, vec3 x);\n // Arc tangent. Returns an angle whose tangent is `y/x`. The signs of `x` and `y` are used to determine what quadrant the\n // angle is in. The range of values returned by this function is `[−π,π]`. Results are undefined if `x` and `y` are both 0.\n vec4 atan(vec4 y, vec4 x);\n\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n float atan(float y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec2 atan(vec2 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec3 atan(vec3 y_over_x);\n // Arc tangent. Returns an angle whose tangent is `y_over_x`. The range of values returned by this function is `[-π/2, π/2]`.\n vec4 atan(vec4 y_over_x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Exponential Functions\n\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n float pow(float x, float y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec2 pow(vec2 x, vec2 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec3 pow(vec3 x, vec3 y);\n // Returns `x` raised to the `y` power, i.e., `xʸ`. Results are undefined if `x < 0`. Results are undefined if `x = 0` and `y <= 0`.\n vec4 pow(vec4 x, vec4 y);\n\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n float exp(float x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec2 exp(vec2 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec3 exp(vec3 x);\n // Returns the natural exponentiation of `x`, i.e., `eˣ`\n vec4 exp(vec4 x);\n\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n float log(float x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec2 log(vec2 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec3 log(vec3 x);\n // Returns the natural logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = eʸ`. Results are undefined if `x <= 0`.\n vec4 log(vec4 x);\n\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n float exp2(float x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec2 exp2(vec2 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec3 exp2(vec3 x);\n // Returns 2 raised to the `x` power, i.e., `2ˣ`.\n vec4 exp2(vec4 x);\n\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n float log2(float x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec2 log2(vec2 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec3 log2(vec3 x);\n // Returns the base 2 logarithm of `x`, i.e., returns the value `y` which satisfies the equation `x = 2ʸ`. Results are undefined if `x <= 0`.\n vec4 log2(vec4 x);\n\n // Returns `√x`. Results are undefined if `x < 0`.\n float sqrt(float x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec2 sqrt(vec2 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec3 sqrt(vec3 x);\n // Returns `√x`. Results are undefined if `x < 0`.\n vec4 sqrt(vec4 x);\n\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n float inversesqrt(float x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec2 inversesqrt(vec2 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec3 inversesqrt(vec3 x);\n // Returns `1 / √x`. Results are undefined if `x <= 0`.\n vec4 inversesqrt(vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Common Functions\n\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n float abs(float x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec2 abs(vec2 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec3 abs(vec3 x);\n // Returns `x` if `x >= 0`, otherwise it returns `-x`.\n vec4 abs(vec4 x);\n\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n float sign(float x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec2 sign(vec2 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec3 sign(vec3 x);\n // Returns `1.0` if `x > 0`, `0.0` if `x = 0`, or `-1.0` if `x < 0`\n vec4 sign(vec4 x);\n\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n float floor(float x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec2 floor(vec2 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec3 floor(vec3 x);\n // Returns a value equal to the nearest integer that is less than or equal to `x`\n vec4 floor(vec4 x);\n\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n float ceil(float x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec2 ceil(vec2 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec3 ceil(vec3 x);\n // Returns a value equal to the nearest integer that is greater than or equal to `x`\n vec4 ceil(vec4 x);\n\n // Returns `x - floor(x)`\n float fract(float x);\n // Returns `x - floor(x)`\n vec2 fract(vec2 x);\n // Returns `x - floor(x)`\n vec3 fract(vec3 x);\n // Returns `x - floor(x)`\n vec4 fract(vec4 x);\n\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n float mod(float x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, float y);\n // Modulus (modulo). Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, float y);\n\n // Modulus. Returns `x - y * floor(x/y)`\n vec2 mod(vec2 x, vec2 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec3 mod(vec3 x, vec3 y);\n // Modulus. Returns `x - y * floor(x/y)`\n vec4 mod(vec4 x, vec4 y);\n\n // Returns `y` if `y < x`, otherwise it returns `x`\n float min(float x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec2 min(vec2 x, vec2 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec3 min(vec3 x, vec3 y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, float y);\n // Returns `y` if `y < x`, otherwise it returns `x`\n vec4 min(vec4 x, vec4 y);\n\n // Returns `y` if `x < y`, otherwise it returns `x`\n float max(float x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec2 max(vec2 x, vec2 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec3 max(vec3 x, vec3 y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, float y);\n // Returns `y` if `x < y`, otherwise it returns `x`\n vec4 max(vec4 x, vec4 y);\n\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n float clamp(float x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, float minVal, float maxVal);\n // Returns `min(max(x, minVal), maxVal)`. Results are undefined if `minVal > maxVal`.\n vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);\n\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n float mix(float x, float y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec2 mix(vec2 x, vec2 y, vec2 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec3 mix(vec3 x, vec3 y, vec3 a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, float a);\n // Returns the linear blend of `x` and `y`, i.e. `x * (1-a) + y * a`\n vec4 mix(vec4 x, vec4 y, vec4 a);\n\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n float step(float edge, float x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(float edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec2 step(vec2 edge, vec2 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(float edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec3 step(vec3 edge, vec3 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(float edge, vec4 x);\n // Returns `0.0` if `x < edge`, otherwise it returns `1.0`\n vec4 step(vec4 edge, vec4 x);\n\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n float smoothstep(float edge0, float edge1, float x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(float edge0, float edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec2 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(float edge0, float edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec3 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(float edge0, float edge1, vec4 x);\n // Returns `0.0` if `x <= edge0` and `1.0` if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.\n // This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to:\n //\n // ```glslx\n // vec4 t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n // return t * t * (3.0 - 2.0 * t);\n // ```\n //\n // Results are undefined if `edge0 >= edge1`.\n vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Geometric Functions\n\n // Returns the length of vector `x`, i.e. `√x²`\n float length(float x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]²`\n float length(vec2 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]²`\n float length(vec3 x);\n // Returns the length of vector `x`, i.e. `√x[0]² + x[1]² + x[2]² + x[3]²`\n float length(vec4 x);\n\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(float p0, float p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec2 p0, vec2 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec3 p0, vec3 p1);\n // Returns the distance between `p0` and `p1`, i.e. `length(p0 - p1)`\n float distance(vec4 p0, vec4 p1);\n\n // Returns the dot product of `x` and `y`, i.e. `x*y`\n float dot(float x, float y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1]`\n float dot(vec2 x, vec2 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2]`\n float dot(vec3 x, vec3 y);\n // Returns the dot product of `x` and `y`, i.e. `x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3]`\n float dot(vec4 x, vec4 y);\n\n // Returns the cross product of `x` and `y`, i.e.\n //\n // ```glslx\n // vec3(\n // x[1]*y[2] - y[1]*x[2],\n // x[2]*y[0] - y[2]*x[0],\n // x[0]*y[1] - y[0]*x[1])\n // ```\n vec3 cross(vec3 x, vec3 y);\n\n // Returns a vector in the same direction as `x` but with a length of 1.\n float normalize(float x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec2 normalize(vec2 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec3 normalize(vec3 x);\n // Returns a vector in the same direction as `x` but with a length of 1.\n vec4 normalize(vec4 x);\n\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n float faceforward(float N, float I, float Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec2 faceforward(vec2 N, vec2 I, vec2 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec3 faceforward(vec3 N, vec3 I, vec3 Nref);\n // If `dot(Nref, I) < 0` return `N`, otherwise return `-N`\n vec4 faceforward(vec4 N, vec4 I, vec4 Nref);\n\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n float reflect(float I, float N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec2 reflect(vec2 I, vec2 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec3 reflect(vec3 I, vec3 N);\n // For the incident vector `I` and surface orientation `N`, returns the reflection direction: `I - 2 * dot(N, I) * N`.\n // `N` must already be normalized in order to achieve the desired result.\n vec4 reflect(vec4 I, vec4 N);\n\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return float(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n float refract(float I, float N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec2(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec2 refract(vec2 I, vec2 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec3(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec3 refract(vec3 I, vec3 N, float eta);\n // For the incident vector `I` and surface normal `N`, and the ratio of indices of refraction `eta`, return the refraction vector.\n // The result is computed by:\n //\n // ```glslx\n // float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));\n // if (k < 0.0) return vec4(0.0);\n // else return eta * I - (eta * dot(N, I) + sqrt(k)) * N;\n // ```\n //\n // The input parameters for the incident vector `I` and the surface normal `N`.\n vec4 refract(vec4 I, vec4 N, float eta);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Matrix Functions\n\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat2 matrixCompMult(mat2 x, mat2 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat3 matrixCompMult(mat3 x, mat3 y);\n // Multiply matrix `x` by matrix `y` component-wise, i.e., `result[i][j]` is the scalar product of `x[i][j]` and `y[i][j]`.\n // Note: to get linear algebraic matrix multiplication, use the multiply operator (`*`).\n mat4 matrixCompMult(mat4 x, mat4 y);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Vector Relational Functions\n\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec2 lessThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec3 lessThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x < y`.\n bvec4 lessThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec2 lessThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec3 lessThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x <= y`.\n bvec4 lessThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec2 greaterThan(vec2 x, vec2 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec3 greaterThan(vec3 x, vec3 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x > y`.\n bvec4 greaterThan(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec2 greaterThanEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec3 greaterThanEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x >= y`.\n bvec4 greaterThanEqual(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec2 equal(vec2 x, vec2 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec3 equal(vec3 x, vec3 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x == y`.\n bvec4 equal(vec4 x, vec4 y);\n\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(bvec2 x, bvec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(ivec2 x, ivec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec2 notEqual(vec2 x, vec2 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(bvec3 x, bvec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(ivec3 x, ivec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec3 notEqual(vec3 x, vec3 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(bvec4 x, bvec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(ivec4 x, ivec4 y);\n // Returns the component-wise compare of `x != y`.\n bvec4 notEqual(vec4 x, vec4 y);\n\n // Returns true if any component of `x` is `true`.\n bool any(bvec2 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec3 x);\n // Returns true if any component of `x` is `true`.\n bool any(bvec4 x);\n\n // Returns true only if all components of `x` are `true`.\n bool all(bvec2 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec3 x);\n // Returns true only if all components of `x` are `true`.\n bool all(bvec4 x);\n\n // Returns the component-wise logical complement of `x`.\n bvec2 not(bvec2 x);\n // Returns the component-wise logical complement of `x`.\n bvec3 not(bvec3 x);\n // Returns the component-wise logical complement of `x`.\n bvec4 not(bvec4 x);\n\n ////////////////////////////////////////////////////////////////////////////////\n // Texture Lookup Functions\n\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2D(sampler2D sampler, vec2 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`.\n vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the 2D texture currently bound to `sampler`.\n // The texture coordinate `(coord.s, coord.t)` is divided by the last component of `coord`. The third component of `coord` is ignored.\n vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);\n\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCube(samplerCube sampler, vec3 coord, float bias);\n // Use the texture coordinate `coord` to do a texture lookup in the cube map texture currently bound to `sampler`.\n // The direction of `coord` is used to select which face to do a 2-dimensional texture lookup in.\n vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);\n\n #extension GL_OES_standard_derivatives {\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdx(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdx(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdx(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `x` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdx(dFdx(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdx(vec4 v);\n\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n float dFdy(float v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec2 dFdy(vec2 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec3 dFdy(vec3 v);\n // Available only in the fragment shader, this function returns the partial derivative of expression `p` with respect to the window `y` coordinate.\n //\n // Expressions that imply higher order derivatives such as `dFdy(dFdy(n))` have undefined results, as do mixed-order derivatives such as\n // `dFdx(dFdy(n))`. It is assumed that the expression `p` is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.\n vec4 dFdy(vec4 v);\n\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n float fwidth(float v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec2 fwidth(vec2 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec3 fwidth(vec3 v);\n // Returns the sum of the absolute derivative in `x` and `y` using local differencing for the input argument `p`, i.e. `abs(dFdx(p)) + abs(dFdy(p))`\n vec4 fwidth(vec4 v);\n }\n\n #extension GL_EXT_frag_depth {\n // Available only in the fragment language, `gl_FragDepthEXT` is an output variable that is used to establish the depth value for the current fragment.\n // If depth buffering is enabled and no shader writes to `gl_FragDepthEXT`, then the fixed function value for depth will be used (this value is contained\n // in the `z` component of `gl_FragCoord`) otherwise, the value written to `gl_FragDepthEXT` is used.\n //\n // If a shader statically assigns to `gl_FragDepthEXT`, then the value of the fragment's depth may be undefined for executions of the shader that take\n // that path. That is, if the set of linked fragment shaders statically contain a write to `gl_FragDepthEXT`, then it is responsible for always writing it.\n float gl_FragDepthEXT;\n }\n\n #extension GL_EXT_shader_texture_lod {\n vec4 texture2DGradEXT(sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DLodEXT(sampler2D sampler, vec2 coord, float lod);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjGradEXT(sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec3 coord, float lod);\n vec4 texture2DProjLodEXT(sampler2D sampler, vec4 coord, float lod);\n vec4 textureCubeGradEXT(samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy);\n vec4 textureCubeLodEXT(samplerCube sampler, vec3 coord, float lod);\n }\n}\n"));
|
|
6
|
+
for(var O=0,la=b.length;O<la;O=O+1|0){var d=b[O];d.c=Nc(a,d,0)}for(var e=new Lh(0),f=new Xh(1,null),h=new wh(c.e),l=new Vh(a,h),L=0,ha=b.length;L<ha;L=L+1|0){var m=b[L];qd(a,m.c,e,h,f,l)}if(ud(l,e),a.d)return null;for(var g=[],i=[],ba=0,sa=df(f),ca=sa.length;ba<ca;ba=ba+1|0){for(var n=sa[ba],k=new Lh(0),p=new Xh(1,null),t=new wh(c.e),w=new Kh,v=new Vh(w,t),ga=0,Z=b.length;ga<Z;ga=ga+1|0){var q=b[ga];qd(w,q.c,k,t,p,v)}ud(v,k),ef(p,n),Dg(k,t,c),i.push(k),g.push(n.c)}for(var K=[],C=sg(new Th(c.c),i),F=0,ma=g.length;F<ma;F=F+1|0)K.push(new Zh(g[F],new Ah(i[F],c).a));return new xh(K,C)}function df(a){for(var b=[],d=0,e=Array.from(a.c.values()),f=e.length;d<f;d=d+1|0){var c=e[d];c instanceof mc&&c.e&1024&&b.push(c)}return b}function ef(a,b){for(var e=0,f=Array.from(a.c.values()),h=f.length;e<h;e=e+1|0){var c=f[e];if(c.a^b.a)c.e&=-1025;else{c.c='main';var d=c.w;d&&(d.c=c.c)}}}function ff(c,a){var b=a.m;c.b.push(c.b.length==0||Xc(c.b)),b&&ie(b.b)&&c.a.push(!1)}function gf(d,a){var b=a.m,c=d.b.pop();c&&(a.p=!0),b&&ie(b.b)&&!d.a.pop()&&(b.b==19&&Sa(b.g)||b.b==7&&Sa(b.i)||b.b==10&&(!Da(b)||Sa(Da(b))))&&hb(d.b,
|
|
7
|
+
!1)}function Od(e,a){if(Xc(e.b))switch(a.b){case 4:e.a.length&&hb(e.a,!0),hb(e.b,!1);break;case 15:case 6:case 5:hb(e.b,!1);break;case 12:var b=a.g,c=a.g.k,d=a.g.k.k;Sa(b)?c.p||hb(e.b,!1):Ib(b)&&d?d.p||hb(e.b,!1):c&&d&&!c.p&&!d.p&&hb(e.b,!1);break}}function hf(a,b){return Pd(a)||Pd(b)||a.b!=b.b&&(a.b==14||b.b==14||a.b==9||b.b==9)}function Pd(a){return a.b==11&&a.e.p!=null}function Qd(a,b){var c=a.toString(),d=a.toExponential();d.length<c.length&&(c=d);var e=c.indexOf('e'),f='';return ~e&&(f=c.slice(e),c=c.slice(0,e)),c=(+(+c).toFixed(6)).toString(),f==''&&c.indexOf('.')==-1&&(c+=b^1?'.0':'.'),b==1&&c.startsWith('0.')&&c!='0.'&&(c=c.slice(1)),b==1&&c.startsWith('-0.')&&c!='-0.'&&(c='-'+c.slice(2)),c+f}function jf(b,a){switch(a.b){case 11:case 16:return (a.e.e&2048)!=0;case 17:return ((a.h|0)&2048)!=0}return!1}function Zc(a){a.e||(a.b+=' ')}function _c(a){a.e||(a.b=a.b.slice(2))}function Wa(i,a){switch(a.b){case 3:if(!a.g&&a.m)i.a+=';';else{i.a+='{'+i.c,Zc(i);for(var b=a.g;b;b=b.k)i.a+=i.b,Wa(i,b),i.a+=i.c;_c(i),
|
|
8
|
+
i.a+=i.b+'}'}break;case 4:i.a+='break;';break;case 5:i.a+='continue;';break;case 6:i.a+='discard;';break;case 7:i.a+='do',cc(i,a.g,0),i.a+=i.c+i.b+'while'+i.d+'(',J(i,a.i,0),i.a+=');';break;case 8:J(i,a.g,0),i.a+=';';break;case 9:Rd(i),i.a+='#extension '+a.l+i.d+':'+i.d;switch(a.h|0){case 1:i.a+='disable';break;case 2:i.a+='enable';break;case 3:i.a+='require';break;case 4:i.a+='warn';break}Sd(i);break;case 10:i.a+='for'+i.d+'(',kb(a)?kb(a).b^17?(J(i,kb(a),0),i.a+=';'):Wa(i,kb(a)):i.a+=';',Da(a)&&(i.a+=i.d,J(i,Da(a),0)),i.a+=';',Ic(a)&&(i.a+=i.d,J(i,Ic(a),0)),i.a+=')',cc(i,a.i,1);break;case 11:var c=a.e;i.a+=_a(c.e),J(i,c.k,0),i.a+=' ',i.a+=c.c,i.a+='(';for(var n=0,k=c.n,p=k.length;n<p;n=n+1|0){var d=k[n];d!=c.n[0]&&(i.a+=','+i.d),i.a+=_a(d.e),J(i,d.q,0),i.a+=' ',$c(i,d)}i.a+=')',c.p?(i.a+=i.d,Wa(i,c.p)):i.a+=';';break;case 12:i.a+='if'+i.d+'(',J(i,a.g,0),i.a+=')',cc(i,a.g.k,1),a.g.k.k&&(i.a+=i.c+i.b+'else',a.g.k.k.b^12?cc(i,a.g.k.k,0):(i.a+=' ',Wa(i,a.g.k.k)));break;case 14:i.a+='precision ',i.a+=_a(a.h|0),J(i,
|
|
9
|
+
a.g,0),i.a+=';';break;case 15:var e=a.g;i.a+='return',e&&(Vf(e.b)||(i.a+=' '),J(i,e,0)),i.a+=';';break;case 16:var f=a.e;i.a+=_a(f.e),i.a+='struct '+f.c+i.d+'{'+i.c,Zc(i);for(var h=a.g.g;h;h=h.k)i.a+=i.b,Wa(i,h),i.a+=i.c;if(_c(i),i.a+=i.b+'}',a.g.k)for(var l=a.g.k.g.k;l;l=l.k)i.a+=l.n.n?','+i.d:i.d,$c(i,l.e);i.a+=';';break;case 17:i.a+=_a(a.h|0),J(i,a.g,0);for(var m=a.g.k;m;m=m.k){var g=m.e;i.a+=m.n.n?','+i.d:' ',$c(i,g)}i.a+=';';break;case 18:Rd(i),i.a+='#version '+(a.h|0),Sd(i);break;case 19:i.a+='while'+i.d+'(',J(i,a.g,0),i.a+=')',cc(i,a.i,1);break;default:i.a+=Wg[a.b];break}}function Rd(a){a.a!=''&&!a.a.endsWith('\n')&&(a.a+='\n')}function Sd(a){a.e&&(a.a+='\n')}function cc(c,a,b){a.b^3?(c.a+=c.e&&!b?' ':c.c,Zc(c),c.a+=c.b,Wa(c,a),_c(c)):(c.a+=c.d,Wa(c,a))}function Td(c,a){for(var b=a;b;b=b.k)b!=a&&(c.a+=','+c.d),J(c,b,1)}function $c(b,a){b.a+=a.c,a.C&&(b.a+='[',J(b,a.C,0),b.a+=']'),P(a)&&(b.a+=b.d+'='+b.d,J(b,P(a),1))}function J(c,a,b){switch(a.b){case 20:J(c,a.g,15),c.a+='(',Td(c,a.g.k),c.a+=')';break;case 21:
|
|
10
|
+
J(c,a.g,16),c.a+='.',c.a+=a.e?a.e.c:a.l;break;case 22:2<b&&(c.a+='('),J(c,a.g,3),c.a+=c.d+'?'+c.d,J(c,a.g.k,2),c.a+=c.d+':'+c.d,J(c,a.i,2),2<b&&(c.a+=')');break;case 23:c.a+=a.e.c;break;case 25:0<b&&(c.a+='('),Td(c,a.g),0<b&&(c.a+=')');break;case 26:c.a+=Ne(a.f).a.c;break;case 28:c.a+=(!!a.h).toString();break;case 29:c.a+=Qd(a.h,c.e?1:0);break;case 30:c.a+=(a.h|0).toString();break;case 43:J(c,a.g,16),c.a+='[',J(c,a.i,0),c.a+=']';break;case 31:dc(c,'-',a,b);break;case 32:dc(c,'!',a,b);break;case 33:dc(c,'+',a,b);break;case 34:dc(c,'--',a,b);break;case 35:dc(c,'++',a,b);break;case 36:Ud(c,'--',a,b);break;case 37:Ud(c,'++',a,b);break;case 38:V(c,'+',a,b,12);break;case 39:V(c,'/',a,b,13);break;case 40:V(c,'==',a,b,10);break;case 41:V(c,'>',a,b,10);break;case 42:V(c,'>=',a,b,10);break;case 44:V(c,'<',a,b,10);break;case 45:V(c,'<=',a,b,10);break;case 46:V(c,'&&',a,b,5);break;case 47:V(c,'||',a,b,3);break;case 48:V(c,'^^',a,b,4);break;case 49:V(c,'*',a,b,13);break;case 50:V(c,'!=',a,b,10);break;case 51:V(c,'-',a,b,12);
|
|
11
|
+
break;case 52:V(c,'=',a,b,2);break;case 53:V(c,'+=',a,b,2);break;case 54:V(c,'/=',a,b,2);break;case 55:V(c,'*=',a,b,2);break;case 56:V(c,'-=',a,b,2);break;default:c.a+=Wg[a.b];break}}function dc(f,a,b,c){var d=b.g,e=d.b;f.a+=a,(a.charCodeAt(0)==45&&(e==31||e==34||_f(d))||a.charCodeAt(0)==43&&(e==33||e==35))&&(f.a+=' '),J(f,d,14)}function Ud(d,a,b,c){J(d,b.g,15),d.a+=a}function V(f,a,b,c,d){var e=Fc(b.b);d<c&&(f.a+='('),J(f,b.g,d+(e|0)|0),f.a+=f.d+a+f.d,J(f,b.i,d+(!e|0)|0),d<c&&(f.a+=')')}function G(a){if(a.f==I)return null;switch(a.b){case 30:case 29:case 28:return Xa(a);case 23:return kf(a);case 25:return lf(a);case 22:return mf(a);case 21:return nf(a);case 43:return of(a);case 20:return pf(a);case 31:return _d(a,function(b){return-b},function(c){return -c|0});case 32:return wf(a,function(d){return!d});case 33:return _d(a,function(e){return+e},function(f){return+f});case 38:return bd(a,function(h,l){return h+l},function(m,g){return m+g|0});case 51:return bd(a,function(i,n){return i-n},function(k,p){return k-p|0});
|
|
12
|
+
case 49:return qf(a);case 39:return bd(a,function(t,w){return w!=0?t/w:0},function(v,q){return q?v/q|0:0});case 40:case 50:return tf(a);case 46:return ad(a,function(K,C){return K&&C});case 47:return ad(a,function(F,O){return F||O});case 48:return ad(a,function(la,L){return la!=L});case 41:return xc(a,function(ha,ga){return ha>ga});case 42:return xc(a,function(Z,ba){return Z>=ba});case 44:return xc(a,function(sa,ca){return sa<ca});case 45:return xc(a,function(ma,ya){return ma<=ya})}return null}function kf(a){var b=a.e;if(b&&b.e&2){if(b.h)return Xa(b.h);if(b.v)return s(new Lh(27),a.f)}return null}function lf(a){for(var b=a.g;b;b=b.k){var c=G(b);if(!c||b==a.i)return c}return null}function mf(a){var b=G(a.g),c=G(a.g.k),d=G(a.i);return b&&b.b==28&&c&&d?!b.h?d:c:null}function nf(a){var b=G(a.g);if(b&&b.b==20){var c=b.f,d=a.l;if(Ed(c))for(var e=d.length,f=Fa(c),t=0,w=zd(f),v=w.length;t<v;t=t+1|0){var h=w[t];if(~h.indexOf(d[0])){if(e==1)return r(gc(b,1+h.indexOf(d)|0));for(var l=Ad(ea(c),e),m=ua(l),g=0;g<e;g=g+1|0)o(m,
|
|
13
|
+
Xa(gc(b,1+h.indexOf(d[g])|0)));return m}}else if(c.a&&c.a instanceof ac)for(var i=c.a,n=i.i,k=0,q=n.length;k<q;k=k+1|0){var p=n[k];if(p.c==d)return r(gc(b,1+k|0))}}return null}function of(a){var b=G(a.g),c=G(a.i);if(b&&b.b==20&&c&&c.b==30){var d=b.f;if(Ed(d)){var e=Ta(d),f=c.h|0;if(-1<f&&f<e)return r(gc(b,f+1|0))}else if($a(d)){var h=Ta(d),l=c.h|0;if(-1<l&&l<h){for(var m=Dd(d),g=ua(m),i=gc(b,sh(l,h)),n=0;n<h;n=n+1|0)o(g,r(i.k));return g}}}return null}function pf(a){var b=a.g;if(b.b^26)return null;for(var c=b.f,d=ea(c),e=0,f=[],h=0,l=b.k;l;l=l.k){var m=G(l);if(!m)return null;if(m.b==20&&d&&ea(m.g.f))for(var g=m.g.k;g;g=g.k){var i=Vd(d,g);if(!i)return null;f.push(i)}else{if(d&&(m=Vd(d,m),!m))return null;f.push(m)}$a(m.f)&&(e=Ta(m.f)),h=h+1|0}return $a(c)&&e&&h^1?null:ea(c)?rf(f,c,$a(c)?e:0):c.a&&c.a instanceof ac?sf(f,c):null}function Hb(a){for(var b=[],c=a.g.k;c;c=c.k)b.push(c.h);return b}function qf(a){var ya,b=G(a.g),c=G(a.i),d=b&&b.f,e=c&&c.f;if(b&&c){if(d==Ga&&e==ob||d==Ha&&e==pb||d==Ia&&e==qb){for(var f=Ta(d),h=ua(d),l=Hb(b),m=Hb(c),g=0;g<f;g=g+1|0){
|
|
14
|
+
for(var i=0,n=0;n<f;n=n+1|0)i+=l[n]*m[n+sh(g,f)|0];o(h,s(na(new Lh(29),i),$))}return h}if(d==ob&&e==Ga||d==pb&&e==Ha||d==qb&&e==Ia){for(var k=Ta(d),p=ua(e),t=Hb(b),w=Hb(c),v=0;v<k;v=v+1|0){for(var q=0,K=0;K<k;K=K+1|0)q+=t[v+sh(K,k)|0]*w[K];o(p,s(na(new Lh(29),q),$))}return p}if($a(d)&&e==d){for(var C=Ta(d),F=ua(d),O=Hb(b),la=Hb(c),L=0;L<C;L=L+1|0)for(var ha=0;ha<C;ha=ha+1|0){for(var ga=0,Z=0;Z<C;Z=Z+1|0)ga+=O[ha+sh(Z,C)|0]*la[Z+sh(L,C)|0];o(F,s(na(new Lh(29),ga),$))}return F}return (ya=Yd(b,c,function(ba,sa){return ba*sa}))||Zd(b,c,function(ca,ma){return sh(ca,ma)})}return null}function Vd(a,b){var c=0;switch(b.b){case 28:c=+!!b.h;break;case 30:c=b.h|0;break;case 29:c=b.h;break;default:return null}switch(a){case aa:return s(Ca(new Lh(28),!!c),aa);case fa:return s(_(new Lh(30),c|0),fa);case $:return s(na(new Lh(29),c),$)}return null}function rf(a,b,c){var d=Fa(b),e=ea(b),f=ua(b);if(a.length^1){if(c){for(var n=Ta(b),k=0;k<n;k=k+1|0)for(var p=0;p<n;p=p+1|0)o(f,p<c&&k<c?a[p+sh(k,c)|0]:s(na(new Lh(29),p^k?0:1),$))}
|
|
15
|
+
else{if(a.length<d)return null;for(var t=0;t<d;t=t+1|0){var w=a[t];if(w.f!=e)return null;o(f,w)}}}else{var h=a[0];if(h.f!=e)return null;for(var l=$a(b),m=Ta(b),g=0;g<d;g=g+1|0){var i=l&&(g%(m+1|0)|0)!=0;o(f,i?s(na(new Lh(29),0),$):Xa(h))}}return Dd(b)?f:r(f.i)}function sf(a,b){var c=b.a.i,d=ua(b);if(a.length^c.length)return null;for(var e=0,f=a.length;e<f;e=e+1|0){if(a[e].f!=c[e].q.f)return null;o(d,a[e])}return d}function tf(a){var b=G(a.g),c=G(a.i);if(b&&c){var d=pa(b,c);return s(Ca(new Lh(28),a.b^40?!d:d),aa)}return null}function Wd(a,b,c,d){if(a.b==20&&a.g.b==26&&ea(a.g.f)==b){for(var e=ua(a.g.f),f=a.g.k;f;f=f.k){var h=G(f);if(!h||h.b^c)return null;o(e,d(h))}return e}return null}function uf(a,b){return a.b^29?Wd(a,$,29,function(c){return s(na(new Lh(29),b(c.h)),$)}):s(na(new Lh(29),b(a.h)),$)}function vf(a,b){return a.b^30?Wd(a,fa,30,function(c){return s(_(new Lh(30),b(c.h|0)),fa)}):s(_(new Lh(30),b(a.h|0)),fa)}function Xd(a,b,c,d,e){var f=a.b==20&&a.g.b==26&&ea(a.g.f)==c,h=b.b==20&&b.g.b==26&&ea(b.g.f)==c;
|
|
16
|
+
if(f&&h&&b.f==a.f){for(var l=ua(a.f),m=a.g.k,g=b.g.k;m&&g;){var i=G(m),n=G(g);if(!i||i.b^d||!n||n.b^d)return null;o(l,e(i,n)),m=m.k,g=g.k}if(!m&&!g)return l}else if(f&&b.b==d){for(var k=ua(a.f),p=a.g.k;p;p=p.k){var t=G(p);if(!t||t.b^d)return null;o(k,e(t,b))}return k}else if(a.b==d&&h){for(var w=ua(b.f),v=b.g.k;v;v=v.k){var q=G(v);if(!q||q.b^d)return null;o(w,e(a,q))}return w}return null}function Yd(a,b,c){return a.b==29&&b.b==29?s(na(new Lh(29),c(a.h,b.h)),$):Xd(a,b,$,29,function(d,e){return s(na(new Lh(29),c(d.h,e.h)),$)})}function Zd(a,b,c){return a.b==30&&b.b==30?s(_(new Lh(30),c(a.h|0,b.h|0)),fa):Xd(a,b,fa,30,function(d,e){return s(_(new Lh(30),c(d.h|0,e.h|0)),fa)})}function wf(a,b){var c=G(a.g);return c&&c.b==28?s(Ca(new Lh(28),b(!!c.h)),aa):null}function _d(a,b,c){var e,d=G(a.g);return d&&((e=uf(d,b))||vf(d,c))}function ad(a,b){var c=G(a.g),d=G(a.i);return c&&d&&c.b==28&&d.b==28?s(Ca(new Lh(28),b(!!c.h,!!d.h)),aa):null}function bd(a,b,c){var f,d=G(a.g),e=G(a.i);return d&&e?(f=Yd(d,e,b))||Zd(d,e,c):null}
|
|
17
|
+
function xc(a,b){var c=G(a.g),d=G(a.i);if(c&&d){if(c.b==29&&d.b==29)return s(Ca(new Lh(28),b(c.h,d.h)),aa);if(c.b==30&&d.b==30)return s(Ca(new Lh(28),b(c.h|0,d.h|0)),aa)}return null}function $d(a,b,c){for(var d=0,e=0,f=a.length;e<f;){var h=a.charCodeAt(e);e=e+1|0,yc(h)&&(d=d+1|0,h==13&&e<f&&a.charCodeAt(e)==10&&(e=e+1|0))}return d>2&&(d=2),bc(c,d)}function xf(a,b,c){switch(c){case 48:switch(b){case 65:return!0;case 96:return!1}break;case 47:switch(b){case 62:return!0;case 96:return!1}break;case 65:if(b==65)return!0;break;case 62:if(b==62)return!0;break;case 85:if(Cd(b)||b==88)return!1;break;case 84:if(Cd(b)||b==88)return!1;break;case 81:case 90:case 89:case 88:case 82:return!1;case 87:if(b==83)return!1;break}switch(b){case 85:case 84:case 82:case 49:case 46:return!1;case 65:case 62:switch(a){case 99:case 85:case 84:case 81:case 80:case 90:case 49:case 46:case 32:case 12:return!1}if(Jg(a))return!1;break;case 48:case 47:if(c==96)return!1;break}return!0}function yc(a){return a==10||a==13}function yf(a){for(var b=0,c=a.length;b<c;b=b+1|0)if(yc(a.charCodeAt(b)))return!0;
|
|
18
|
+
return!1}function ae(a){return a==32||a==9}function zc(a){for(var b=0,c=a.length;b<c;b=b+1|0)if(!ae(a.charCodeAt(b)))return!1;return!0}function zf(a){for(var b=a.length;ae(a.charCodeAt(b-1|0));)b=b-1|0;return a.slice(0,b)}function Af(a,b,c,d){for(var e=[],f=0,h=0,l=a.length;h<l;h=h+1|0){var m=a.charCodeAt(h);yc(m)&&(e.push(a.slice(f,h)),m==13&&(h+1|0)<l&&a.charCodeAt(h+1|0)==10&&(h=h+1|0),f=h+1|0)}e.push(a.slice(f));for(var g=b.length;g>0&&!yc(b.charCodeAt(g-1|0));)g=g-1|0;for(var i=b.slice(g),n=i,q=0,K=e.slice(1),C=K.length;q<C;q=q+1|0){var k=K[q];if(!zc(k)){for(var p=0,t=k.length;p<t&&p<n.length&&k.charCodeAt(p)==n.charCodeAt(p);)p=p+1|0;n=n.slice(0,p)}}for(var w='',F=0,O=e.length;F<O;F=F+1|0){var v=e[F];w==''?(zc(i)&&(w+=i.slice(n.length)),w+=v):(w+=d,zc(v)||(w+=c+v.slice(n.length)))}return w}function Bf(a,b,c,d){var e=new Kh,f=new Zh('<stdin>',a),h=Nc(e,f,1);if(e.d)return a;var l='',m=99,g=99,i=0,n=0,k=!0,p=0,t=null,w=function(v){return!zc(a.slice(h[v-1|0].a.c,h[v].a.b))},q=function(K,C){switch(K){case 90:case 87:
|
|
19
|
+
return!0;case 4:case 9:case 10:case 11:case 12:case 15:case 17:case 32:case 43:return!C}return!1},F=null,O=function(){for(var la=1,L=p;L<h.length;L=L+1|0){switch(h[L].b){case 0:case 1:continue;case 83:la=0;break}break}n=n+la|0,F(),n=n-la|0},ha=function(){var ga=1;return h[p].b==85&&w(p+1|0)&&(ga=0),n=n+ga|0,t(function(Z){return Z==85})?(n=n-ga|0,!0):(n=n-ga|0,!1)};F=function(){for(;t(function(ba){return ba==0||ba==1}););switch(h[p].b){case 99:case 87:return!1;case 45:case 44:t(function(sa){return!0});break;case 17:t(function(ca){return!0}),ha()&&O(),h[p].b^12||F();break;case 15:case 43:t(function(ma){return!0}),ha()&&O();break;case 11:t(function(ya){return!0}),O(),t(function(La){return La==43})&&(ha(),t(function(ka){return ka==90}));break;case 12:if(t(function(cb){return!0}),h[p].b^17)O();else{var Ma=w(p);Ma&&(n=n+1|0),t(function(Ua){return!0}),ha()&&O(),Ma&&(n=n-1|0)}break;case 83:case 90:t(function(wa){return!0});break;case 91:case 92:case 93:case 94:for(t(function(za){return!0});t(function(db){return!w(p)}););
|
|
20
|
+
break;default:var Ja=Cd(h[p].b);if(t(function(Ka){return!0}),Ja&&t(function(eb){return eb==96})&&t(function(rb){return rb==85}))t(function(sb){return sb==83})||t(function(Wb){return Wb==90});else{for(var tb=!1;!tb&&w(p)&&(tb=!0,n=n+1|0),t(function(nc){return!q(nc,!1)}););t(function(ab){return ab==90}),tb&&(n=n-1|0)}break}return!0};var Rc=function(){for(var fb=[],gb=p;gb<h.length;){var ub=h[gb].b;switch(ub){case 83:case 84:case 85:fb.push(ub);break;case 87:if(!fb.length)return gb;if(fb.pop()^83)return-1;break;case 88:if(!fb.length||fb.pop()^84)return-1;break;case 89:if(!fb.length||fb.pop()^85)return-1;break}gb=gb+1|0}return-1},vb=-1,Xb=function(){var Bb=Rc(),Yb=Bb!=-1&&yf(a.slice(h[p-1|0].a.c,h[Bb].a.b));for(Yb&&(vb=p),n=n+1|0;F(););n=n-1|0,Yb&&(vb=p),t(function(Cb){return Cb==87})},Na=!1,Sc=function(){var oc=!Na;for(Na=!0,oc&&(n=n+1|0);t(function(Gd){return Gd!=89}););oc&&(n=n-1|0),t(function(Tc){return Tc==89})},pc=function(){var Zb=!Na;for(Na=!0,Zb&&(n=n+1|0);t(function(qc){return qc!=88}););Zb&&(n=n-1|0),t(function(Db){
|
|
21
|
+
return Db==88})};for(t=function(wb){var xa=h[p];if(!wb(xa.b)||xa.b==99)return!1;var Eb=vb^p?g^99?$d(a.slice(i,xa.a.b),b,c):'':'\n';p=p+1|0,l+=Eb,Eb!=''&&(k=!0,Na=!1),k?l+=bc(b,n):xf(m,g,xa.b)&&(l+=' ');var Va=N(xa.a);switch(xa.b){case 0:Va=zf(Va);break;case 1:Va=Af(Va,a.slice(0,xa.a.b),bc(b,n),c);break}l+=Va,m=g,g=xa.b,i=xa.a.c,k=!1;switch(xa.b){case 83:Xb();break;case 85:Sc();break;case 84:pc();break}return!0};F()||t(function(Uc){return Uc!=99}););var uc=$d(a.slice(i),b,c);switch(d){case 0:uc!=''&&(l+=c);break;case 2:l!=''&&(l+=c);break}return l}function Cf(a){return a.f!=null?new Bh(D(a.h)+' '+a.f+';',''):a.d&&new Bh(Ac(a.d),Bc(a.d.f))}function Cc(b,a){return a.a==b.a&&lc(a,b.b)}function cd(b,a){return Cc(b,a.b)?(b.c=M(a),b.d=a,b.e=a.b,!0):!1}function dd(b,a){return cd(b,a)||Qa(b,a.q)||Qa(b,a.C)||Qa(b,P(a))}function Df(c,a){for(var d=0,e=a.n,f=e.length;d<f;d=d+1|0){var b=e[d];if(dd(c,b))return!0}return cd(c,a)||Qa(c,a.k)||Qa(c,a.p)}function Ef(c,a){for(var d=0,e=a.i,f=e.length;d<f;d=d+1|0){var b=e[d];if(dd(c,
|
|
22
|
+
b))return!0}return cd(c,a)}function Qa(c,a){var d;if(!a)return!1;for(var b=a.g;b;b=b.k)if(Qa(c,b))return!0;switch(a.b){case 23:if(Cc(c,a.c))return c.c=a.f,c.d=a.e,c.e=a.c,!0;break;case 26:if(Cc(c,a.c))return c.c=a.f,c.d=((d=c.c).b?d.b:c.c).a,c.e=a.c,!0;break;case 21:if(Cc(c,a.d))return c.c=a.f,Ed(a.g.f)?(c.f=a.l,c.h=a.f):c.d=a.e,c.e=a.d,!0;break;case 2:return dd(c,a.e);case 11:return Df(c,a.e);case 16:return Ef(c,a.e)}return!1}function ce(d,a){switch(a.b){case 16:case 11:de(d,a.e);break;case 17:for(var b=a.g.k;b;b=b.k)de(d,b.e);break;case 0:for(var c=a.g;c;c=c.k)ce(d,c);break}}function de(b,a){a.b&&a.b.a==b.a&&b.b.push(a)}function Ff(l,a){var b=new Ch(l.a,l.b);if(Qa(b,a),l.d=b.d,l.d){jb(l,a);var c=null;l.c.sort(function(d,e){return d.a==e.a?Wc(d.b,e.b):af(d.a.a,e.a.a)}),Gb(l.c,function(f){var h=c;return c=f,h!=null&&pg(c,h)})}}function ib(c,a,b){b==c.d&&a&&N(a)==c.d.c&&c.c.push(a)}function ed(b,a){ib(b,a.b,a),jb(b,a.q),jb(b,a.C),jb(b,P(a))}function Gf(c,a){ib(c,a.b,a),ib(c,a.b,a.w),jb(c,a.k),jb(c,a.p);for(var d=0,e=a.n,f=e.length;d<f;d=d+1|0){
|
|
23
|
+
var b=e[d];ed(c,b)}}function Hf(c,a){ib(c,a.b,a);for(var d=0,e=a.i,f=e.length;d<f;d=d+1|0){var b=e[d];ed(c,b)}}function jb(c,a){if(a){for(var b=a.g;b;b=b.k)jb(c,b);switch(a.b){case 23:ib(c,a.c,a.e);break;case 21:ib(c,a.d,a.e);break;case 26:ib(c,a.c,a.f.a);break;case 2:ed(c,a.e);break;case 11:Gf(c,a.e);break;case 16:Hf(c,a.e);break}}}function If(c,a){W(c,'keyword','false'),W(c,'keyword','true'),W(c,'keyword','void'),W(c,'keyword','const'),W(c,'keyword','lowp'),W(c,'keyword','mediump'),W(c,'keyword','highp');for(var d=0,e=Rg.length;d<e;d=d+1|0){var b=Rg[d];W(c,'struct',b.a.c).c=Ac(b.a)}gd(c,a)}function fd(b,a){return a!=null&&a.a==b.a&&lc(a,b.b)}function W(d,a,b){var c=null;return d.c.has(b)?c=d.c.get(b):(c=new Fh(a,b),d.d.push(c),Oa(d.c,b,c)),c}function fc(d,a){var b=a instanceof mc?'function':a instanceof ac?'struct':'variable',c=W(d,b,a.c);c.c!=''?c.c+='\n':c.d=Bc(a.f),c.c+=Ac(a)}function gd(C,a){if(!a)return!1;var b=fd(C,a.c);switch(a.b){case 0:for(var c=!1,d=a.g;d;d=d.k)if(d.b==11&&fd(C,d.c)){c=!0;break}c||(W(C,
|
|
24
|
+
'keyword','precision'),W(C,'keyword','uniform'),W(C,'keyword','attribute'),W(C,'keyword','varying'));break;case 11:if(fc(C,a.e),b){var e=a.e;W(C,'keyword','discard'),W(C,'keyword','return');for(var F=0,O=e.n,la=O.length;F<la;F=F+1|0){var f=O[F];fc(C,f)}gd(C,e.p)}break;case 2:fc(C,a.e);break;case 16:fc(C,a.e);break;case 10:case 19:case 7:b&&(W(C,'keyword','break'),W(C,'keyword','continue'));break;case 21:var h=a.g;if(b&&!fd(C,h.c)){C.d=[];var l=h.f;switch(l){case Tb:case yb:case Ga:case Ub:case zb:case Ha:case Vb:case Ab:case Ia:for(var L=0,ha=zd(Fa(l)),ga=ha.length;L<ga;L=L+1|0)for(var m=ha[L],g=1;g<5;g=g+1|0){for(var i=[],n=0;n<g;n=n+1|0)i.push(0);for(;;){for(var k='',p=0;p<g;p=p+1|0)k+=m[i[p]];var t=Ad(ea(l),k.length).a;W(C,'variable',k).c=t.c+' '+k+';';for(var w=0;w<g;){var v=i[w];if((v=v+1|0)^m.length||(v=0),i[w]=v,v)break;w=w+1|0}if(w==g)break}}break;default:if(l.a&&l.a instanceof ac)for(var Z=0,ba=l.a.i,sa=ba.length;Z<sa;Z=Z+1|0){var q=ba[Z];fc(C,q)}break}return!0}break}if(!a.b||b||a.b==17)for(var K=a.g;K;K=K.k)if(gd(C,
|
|
25
|
+
K))return!0;return b}function ee(b,a){return a!=null&&a.a==b.a&&lc(a,b.b)}function hd(ka,a){if(!a||a.b&&!ee(ka,a.c))return!1;for(var b=a.g;b;b=b.k)if(hd(ka,b))return!0;switch(a.b){case 11:return hd(ka,a.e.p),!0;case 20:var c=a.g;if(!ee(ka,c.c)){for(var d=c.k,e=c.f,f=e.a,h=[],l=d;l;l=l.k)h.push(l);if(f instanceof mc){for(var m=[],g=f;g;g=g.t)~m.indexOf(g.w)||m.push(g);m.reverse();for(var cb=0,Ma=m.length;cb<Ma;cb=cb+1|0){var i=m[cb];ka.c.push(new Hh(Ac(i),i.n.map(function(n){return ec(n)}),Bc(i.f)))}if(ka.c.length){ka.e=0;for(var k=[],p=0;p<m.length;p=p+1|0)k.push(p);for(var t=h.length;t>0;t=t-1|0){for(var w=[],Ua=0,wa=k,za=wa.length;Ua<za;Ua=Ua+1|0){var v=wa[Ua];m[v].n.length>=t&&w.push(v)}if(w.length){k=w;break}}if(k.length>1){var q=k.slice();Gb(q,function(K){for(var C=m[K].n,F=0,db=Math.min(C.length,h.length);F<db;F=F+1|0){var O=C[F].q.f,la=h[F].f;if(la!=I&&O!=la)return!0}return!1}),q.length||(q=k.slice(),Gb(q,function(L){for(var ha=m[L].n,ga=0,Ja=Math.min(ha.length,h.length);ga<Ja;ga=ga+1|0){var Z=ha[ga].q.f,ba=h[ga].f,sa=Fa(Z),ca=Fa(ba);
|
|
26
|
+
if(ba!=I&&Z!=ba&&(!sa||!ca||sa^ca))return!0}return!1})),q.length&&(k=q)}k.length&&(ka.e=k[0])}}if(f instanceof ac&&!ea(e)){var ma=f.i.map(function(ya){return ec(ya)});ka.c.push(new Hh(f.c+'('+ma.join(', ')+');',ma,Bc(f.f))),ka.e=0}if(h.length){ka.d=0;for(var Ka=0,eb=h.length;Ka<eb;Ka=Ka+1|0){var La=h[Ka];if(ka.b<=La.c.c||!La.k)break;ka.d=ka.d+1|0}}return!0}break}return!1}function be(a){switch(a.b){case 30:return (a.h|0).toString();case 28:return (!!a.h).toString();case 29:return Qd(a.h,0);case 20:for(var b=a.g,c=D(a.f)+'(',d=b.k;d;d=d.k)d.n!=b&&(c+=', '),c+=be(d);return c+')'}return null}function Ac(a){if(a instanceof ac){var b=a,c=_a(b.e)+'struct '+a.c;if(b.a>-1){c+=' {\n';for(var i=0,n=b.i,k=n.length;i<k;i=i+1|0){var d=n[i];c+=' '+ec(d)+';\n'}c+='}'}return c+';'}if(a instanceof Me){var e=a,f=ec(e);if(e.h){var h=be(e.h);h!=null&&(f+=' = '+h)}return f+';'}if(a instanceof mc){for(var l=a,m=_a(l.e)+D(l.k.f)+' '+a.c+'(',p=0,t=l.n,w=t.length;p<w;p=p+1|0){var g=t[p];g!=l.n[0]&&(m+=', '),m+=ec(g)}return m+');'}return null}
|
|
27
|
+
function ec(a){var b=a.q.f,c=_a(a.e)+D(b.b||b)+' '+a.c;return b.b&&(c+=b.c?'['+b.c+']':'[]'),c}function Bc(a){var b='';if(a)for(var f=0,h=a.length;f<h;f=f+1|0){var c=a[f],d=0,e=c.length;for(c.startsWith('//')?d=d+2|0:c.startsWith('/*')&&(d=d+2|0,e=e-2|0);d<e&&c.charCodeAt(d)==32;)d=d+1|0;for(;e>d&&c.charCodeAt(e-1|0)==32;)e=e-1|0;b!=''&&(b+='\n'),b+=c.slice(d,e)}return b}function fe(a,b,c){if(!b)return a+': '+c+'\n';var d=sd(b,0);return rd(b)+': '+a+': '+c+'\n'+d.a+'\n'+d.b+'\n'}function Jf(c){for(var a=new ph,d=0,e=c.a,f=e.length;d<f;d=d+1|0){var b=e[d];a.a+=fe(b.a?'warning':'error',b.b,b.c),b.d&&(a.a+=fe('note',b.d,b.e))}return a.a}function u(c,a,b){(!c.e||c.e.b^a.b)&&(c.e=a,c.a.push(new Jh(0,a,b)),c.d=c.d+1|0)}function Kf(c,a,b){c.a.push(new Jh(1,a,b)),c.c=c.c+1|0}function Dc(d,a,b){var c=Xc(d.a);c.d=a,c.e=b}function Lf(b,a){u(b,a,'"'+N(a)+'" is a reserved word')}function Mf(b,a){u(b,a.a,'Unexpected '+Ue[a.b])}function Nf(b,a){u(b,a,'There is no symbol called "'+N(a)+'" in the current scope')}function id(c,a,b){
|
|
28
|
+
u(c,a,'There is already a symbol called "'+N(a)+'" in the current scope'),Dc(c,b,'The previous definition of "'+N(b)+'" is here')}function Of(f,a,b,c,d,e){u(f,a,'Cannot change the return type of "'+b+'" to type "'+D(c)+'"'),Dc(f,e,'The forward declaration of "'+b+'" has a return type of "'+D(d)+'"')}function ge(b,a){u(b,a,'The operator "'+N(a)+'" is reserved and cannot be used')}function Pf(e,a,b,c,d){u(e,a,'The constructor for type "'+D(b)+'" only takes '+c+' argument'+(c^1?'s':'')+' and this argument would bring the total to '+d)}function Qf(d,a,b,c){u(d,a,'Cannot construct type "'+D(b)+'" with '+c+' argument'+(c^1?'s':''))}function Rf(f,a,b,c,d,e){u(f,a,'Expected '+b+' argument'+(b^1?'s':'')+' but found '+c+' argument'+(c^1?'s':'')+' when calling function "'+d+'"'),e&&Dc(f,e,'The definition of function "'+d+'" is here')}function Sf(f,a,b,c,d,e){u(f,a,'Expected '+b+' argument'+(b^1?'s':'')+' but found '+c+' argument'+(c^1?'s':'')+' when constructing type "'+d+'"'),e&&Dc(f,e,'The definition of struct "'+d+'" is here')}
|
|
29
|
+
function Tf(c,a,b){b.b?u(c,a,'Cannot use a conditional expression with array type "'+D(b)+'"'):u(c,a,'Cannot use a conditional expression with type "'+D(b)+'" because it contains an array')}function he(c,a,b){b.b?u(c,a,'Cannot assign to array type "'+D(b)+'"'):u(c,a,'Cannot assign to type "'+D(b)+'" because it contains an array')}function Uf(e,a,b,c,d){c==d?u(e,a,'There is no operator "'+b+'" defined for type "'+D(c)+'"'):u(e,a,'No binary operator "'+b+'" for type "'+D(c)+'" and type "'+D(d)+'"')}function je(b,a){b.b=a.b,b.c=a.c,b.d=a.d,b.e=a.e,b.f=a.f,b.h=a.h,b.l=a.l}function ke(b){var a=new Lh(b.b);return je(a,b),a}function md(b){for(var a=ke(b);b.g;)o(a,r(b.g));return a}function Xa(c){for(var a=ke(c),b=c.g;b;b=b.k)o(a,Xa(b));return a}function H(b,a){a!=b&&(je(b,a),Yf(b),Xf(b,a))}function le(a){return a.g!=null&&a.g==a.i}function gc(c,a){for(var b=c.g;a;)b=b.k,a=a-1|0;return b}function s(b,a){return b.f=a,b}function Gc(b,a){return b.e=a,b}function Ca(b,a){return b.h=+a,b}function _(b,a){return b.h=a,b}function na(b,a){
|
|
30
|
+
return b.h=a,b}function hc(b,a){return b.l=a,b}function x(b,a){return b.c=a,b}function Ra(b,a){return b.d=a,b}function o(b,a){return a?(a.m=b,b.g?(a.n=b.i,b.i.k=a,b.i=a):b.i=b.g=a,b):b}function Xf(b,a){for(;a.g;)o(b,r(a.g));return b}function r(a){return a.n?a.n.k=a.k:a.m.g=a.k,a.k?a.k.n=a.n:a.m.i=a.n,a.m=null,a.n=null,a.k=null,a}function Yf(a){for(;a.g;)r(a.g)}function ia(b,a){return a.m=b.m,a.n=b.n,a.k=b.k,b.n?b.n.k=a:b.m.g=a,b.k?b.k.n=a:b.m.i=a,b.m=null,b.n=null,b.k=null,b}function Hc(c,a,b){return b?a?(b.m=c,b.n=a.n,b.k=a,a.n?a.n.k=b:c.g=b,a.n=b,c):o(c,b):c}function me(a){for(;a.g;)Hc(a.m,a.k,r(a.i));r(a)}function Sa(a){return a.b==28&&!!a.h}function Ib(a){return a.b==28&&!!!a.h}function ic(b,a){return b.b==30&&(b.h|0)==a||b.b==29&&b.h==a}function Zf(a){return a.m!=null&&a.m.b==20&&a.m.g==a}function ne(f){if(f.m){if(ld(f.m.b)||Fc(f.m.b)&&f.m.g==f)return!0;if(f.m.b==20&&f.m.f!=I){var a=f.m.g,b=a.e;if(b&&b instanceof mc)for(var c=b,d=0,e=a.k;e;e=e.k){if(e==f)return (c.n[d].e&16)!=0;d=d+1|0}}}return!1}function oe(a){
|
|
31
|
+
return ne(a)?!0:a.m&&(a.m.b==21||a.m.b==43)?oe(a.m):!1}function pe(a){return a.b==3&&a.g==null}function nd(a){return a.b==25&&a.g==null}function _f(a){return a.b==30&&(a.h|0)<0||a.b==29&&a.h<0}function oa(a){switch(a.b){case 28:case 29:case 30:case 23:return!0;case 22:return oa(a.g)&&oa(a.g.k)&&oa(a.i);case 21:return oa(a.g)}return kd(a.b)?!ld(a.b)&&oa(a.g):Ec(a.b)?!Fc(a.b)&&oa(a.g)&&oa(a.i):!1}function Jb(a){switch(a.b){case 28:Ca(a,!!!a.h);break;case 32:H(a,r(a.g));break;case 40:a.b=50;break;case 50:a.b=40;break;case 44:a.b=42;break;case 41:a.b=45;break;case 45:a.b=41;break;case 42:a.b=44;break;case 25:Jb(a.i);break;case 47:a.b=46,Jb(a.g),Jb(a.i);break;case 46:a.b=47,Jb(a.g),Jb(a.i);break;default:H(a,s(o(new Lh(32),md(a)),aa));break}}function pa(d,a){if(d.b==a.b){switch(d.b){case 28:return !!d.h==!!a.h;case 29:return d.h==a.h;case 30:return (d.h|0)==(a.h|0);case 23:return d.e==a.e;case 26:return d.f==a.f;case 21:return pa(d.g,a.g)&&d.e==a.e&&d.l==a.l;case 22:return pa(d.g,a.g)&&pa(d.g.k,a.g.k)&&pa(d.i,a.i);case 20:
|
|
32
|
+
for(var b=d.g,c=a.g;b&&c;){if(!pa(b,c))return!1;b=b.k,c=c.k}return b==null&&c==null}if(kd(d.b))return pa(d.g,a.g);if(Ec(d.b))return pa(d.g,a.g)&&pa(d.i,a.i)}return!1}function qe(a,b,c,d){return o(o(o(o(new Lh(10),a||new Lh(25)),b||new Lh(25)),c||new Lh(25)),d)}function ua(a){return s(o(new Lh(20),s(new Lh(26),a)),a)}function kb(a){return nd(a.g)?null:a.g}function Da(a){return nd(a.g.k)?null:a.g.k}function Ic(a){return nd(a.i.n)?null:a.i.n}function re(){return Ve=Ve+1|0,Ve}function da(a){return function(b,c){return x(s(new Lh(26),a),c.a)}}function jc(a){return function(b,c,d){return Ra(x(o(new Lh(a),d),Za(c.a,d.c)),c.a)}}function se(a){return function(b,c,d){return Ra(x(o(new Lh(a),c),Za(c.c,d.a)),d.a)}}function X(a){return function(b,c,d,e){return Ra(x(o(o(new Lh(a),c),e),Za(c.c,e.c)),d.a)}}function $f(a){return a.length>1&&a.charCodeAt(0)==48&&a.charCodeAt(1)^120&&a.charCodeAt(1)^88?parseInt(a,8):a|0}function ag(){var a=new Qh,b=function(c,d,e){return ge(c.a,d.a),x(s(new Lh(27),I),Za(d.a,e.c))},f=function(h,l,m,g){
|
|
33
|
+
return ge(h.a,m.a),x(s(new Lh(27),I),Za(l.c,g.c))};return R(a,36,function(i,n){return x(s(Ca(new Lh(28),!0),aa),n.a)}),R(a,13,function(k,p){return x(s(Ca(new Lh(28),!1),aa),p.a)}),R(a,97,function(t,w){return x(s(_(new Lh(30),$f(N(w.a))),fa),w.a)}),R(a,95,function(v,q){return x(s(na(new Lh(29),+N(q.a)),$),q.a)}),R(a,3,da(aa)),R(a,5,da(Tb)),R(a,6,da(Ub)),R(a,7,da(Vb)),R(a,14,da($)),R(a,20,da(fa)),R(a,22,da(yb)),R(a,23,da(zb)),R(a,24,da(Ab)),R(a,26,da(ob)),R(a,27,da(pb)),R(a,28,da(qb)),R(a,39,da(Ga)),R(a,40,da(Ha)),R(a,41,da(Ia)),R(a,42,da(Hd)),Ob(a,46,14,b),Ob(a,47,14,jc(34)),Ob(a,48,14,jc(35)),Ob(a,62,14,jc(31)),Ob(a,49,14,jc(32)),Ob(a,65,14,jc(33)),Be(a,47,15,se(36)),Be(a,48,15,se(37)),S(a,53,13,X(39)),S(a,54,10,X(40)),S(a,55,10,X(41)),S(a,56,10,X(42)),S(a,57,10,X(44)),S(a,58,10,X(45)),S(a,62,12,X(51)),S(a,63,13,X(49)),S(a,64,10,X(50)),S(a,65,12,X(38)),S(a,66,13,f),S(a,67,11,f),S(a,68,11,f),S(a,60,3,X(47)),S(a,61,4,X(48)),S(a,59,5,X(46)),S(a,50,8,f),S(a,51,6,f),S(a,52,7,f),va(a,69,2,X(52)),va(a,70,2,X(53)),va(a,
|
|
34
|
+
71,2,f),va(a,72,2,f),va(a,73,2,f),va(a,74,2,X(54)),va(a,75,2,X(55)),va(a,76,2,f),va(a,77,2,f),va(a,78,2,f),va(a,79,2,X(56)),R(a,96,function(K,C){var F=N(C.a),O=xd(K.m,F);return O?(O.l!=null&&Aa(K.c.a,O.l,0)==1&&u(K.a,C.a,'Cannot use "'+F+'" from disabled extension "'+O.l+'"'),O.g=O.g+1|0,x(O instanceof ac?s(new Lh(26),M(O)):Gc(new Lh(23),O),C.a)):(Nf(K.a,C.a),x(s(new Lh(24),I),C.a))}),S(a,81,1,function(la,L,ha,ga){return L.b^25&&(L=x(o(new Lh(25),L),L.c)),o(L,ga),x(L,B(la,L.c))}),Ea(a,82,16).c=function(Z,ba){var sa=z(Z).a;E(Z);var ca=z(Z).a;return A(Z,96)?Ra(x(hc(o(new Lh(21),ba),N(ca)),B(Z,ba.c)),ca):Ra(x(hc(o(new Lh(21),ba),''),B(Z,ba.c)),De(sa))},Ea(a,85,0).b=function(ma){var ya=E(ma),La=U(a,ma,0);return !La||!A(ma,89)?x(s(new Lh(24),I),B(ma,ya.a)):x(La,B(ma,ya.a))},Ea(a,85,15).c=function(ka,cb){var Ma=E(ka),Ua=o(new Lh(20),cb);return bg(ka,Ua,89)?Ra(x(Ua,B(ka,cb.c)),B(ka,Ma.a)):x(s(new Lh(24),I),B(ka,Ma.a))},Ea(a,84,16).c=function(wa,za){var db=E(wa);if(z(wa).b==88)return Mb(wa),E(wa),x(s(new Lh(24),I),B(wa,
|
|
35
|
+
db.a));var Ja=U(a,wa,0);return !Ja||!A(wa,88)?x(s(new Lh(24),I),B(wa,db.a)):Ra(x(o(o(new Lh(43),za),Ja),B(wa,za.c)),B(wa,db.a))},Ea(a,86,2).c=function(Ka,eb){var rb=E(Ka),sb=U(a,Ka,1);if(!sb||!A(Ka,80))return x(s(new Lh(24),I),B(Ka,rb.a));var Wb=U(a,Ka,1);return Wb?x(o(o(o(new Lh(22),eb),sb),Wb),B(Ka,eb.c)):x(s(new Lh(24),I),B(Ka,rb.a))},a}function bg(a,b,c){for(var d=!0;!Q(a,c);){d||A(a,81);var e=z(a),f=U(bb,a,1);if(f)o(b,f);else if(o(b,x(s(new Lh(24),I),B(a,e.a))),z(a).b^81&&z(a).b^c)return!1;d=!1}return!0}function cg(a){var b=E(a);a.m=new Xh(3,a.m);var c=Ya(a,2);if(!c||!A(a,43)||!A(a,85))return null;var d=U(bb,a,0);return !d||!A(a,89)?null:(Nb(a),Kb(a,b.a,o(o(new Lh(7),c),d)))}function dg(a){var b=E(a),c=a.h;if(a.h|=b.b^44?2048:1024,Q(a,83)){var d=new Lh(13);return !kc(a,d,1)||!A(a,87)?null:(a.h=c,x(d,B(a,b.a)))}var e=Ya(a,1);return e&&(a.h=c,e)}function fg(a){var b=E(a),c=z(a).a;if(!A(a,96))return null;var d=N(c);if(Q(a,83)){a.c.a.has(d)||Oa(a.c.a,d,0);var e=new Lh(13);if(!kc(a,e,1)||!A(a,87))return null;for(var f=e.g;f;f=f.k)if(f.b^17)f.e&&(f.e.l=d);
|
|
36
|
+
else for(var h=f.g.k;h;h=h.k)h.e.l=d;return x(e,B(a,b.a))}if(!dh.has(d)&&!a.c.a.has(d)&&Kf(a.a,c,'The extension "'+d+'" is not in the known list of valid WebGL extensions'),!A(a,80))return null;var l=N(z(a).a);if(!eg.has(l))return Mb(a),null;E(a);var m=eg.get(l);return Oa(a.c.a,d,m),Ra(x(_(hc(new Lh(9),d),m),B(a,b.a)),c)}function gg(a){var b=E(a);if(a.m=new Xh(3,a.m),!A(a,85))return null;var c=null;if(!Q(a,90)){var d=ve(a),e=od(a,2),f=null;if(e){if(f=Lb(a,1),!f)return null}else f=Lb(a,0);if(f){if(c=ue(a,b.a,e,f,0,d),!c)return null}else if((c=U(bb,a,0),!c)||!A(a,90))return null}var h=null;if(!Q(a,90)&&((h=U(bb,a,0),!h)||!A(a,90)))return null;var l=null;if(!Q(a,89)&&((l=U(bb,a,0),!l)||!A(a,89)))return null;var m=Ya(a,2);return m&&(Nb(a),x(qe(c,h,l,m),B(a,b.a)))}function hg(a){var b=E(a);if(!A(a,85))return null;var c=z(a),d=U(bb,a,0);if(d||(d=x(s(new Lh(24),I),B(a,c.a))),!A(a,89))return null;var e=Ya(a,2);if(!e)return null;var f=null;return Q(a,12)&&(f=Ya(a,2),!f)?null:x(o(o(o(new Lh(12),d),e),f),B(a,b.a))}function ig(a){
|
|
37
|
+
var b=E(a),c=z(a).a;return A(a,97)?x(_(new Lh(18),N(c)|0),B(a,b.a)):null}function jg(a){var b=E(a);if(a.m=new Xh(3,a.m),!A(a,85))return null;var c=z(a),d=U(bb,a,0);if(d||(d=x(s(new Lh(24),I),B(a,c.a))),!A(a,89))return null;var e=Ya(a,2);return e&&(Nb(a),x(o(o(new Lh(19),d),e),B(a,b.a)))}function kg(a){var b=E(a),c=null;if(!Q(a,90)){var d=z(a);c=U(bb,a,0),c||(c=x(s(new Lh(24),I),B(a,d.a))),A(a,90)}return x(o(new Lh(15),c),B(a,b.a))}function lg(a){var b=E(a),c=0;switch(z(a).b){case 25:c=32;break;case 29:c=64;break;case 16:c=4;break;default:return Mb(a),null}E(a);var d=Lb(a,1);return d&&Kb(a,b.a,o(_(new Lh(14),c),d))}function mg(a,b,c){var d=z(a).a;if(!A(a,96))return null;var e=new ac(wc(a.c),d,N(d),new Xh(4,a.m));if(e.e|=a.h|b,e.f=c,!pd(a,e))return null;var f=z(a).a,h=new Lh(1),l=null;if(!A(a,83))return null;for(a.m=e.d;z(a).b^87&&z(a).b^99;){var m=Ya(a,3);if(!m)return null;if(m.b^17)u(a.a,m.c,'This statement cannot be used inside a struct');else{o(h,m);for(var g=m.g.k;g;g=g.k){var i=g.e;e.i.push(i),P(i)&&u(a.a,
|
|
38
|
+
P(i).c,'Cannot initialize struct variables')}}}if(Nb(a),!A(a,87))return null;if(x(h,B(a,f)),z(a).b^96)A(a,90);else if(l=ze(0,s(new Lh(26),M(e)),E(a).a,a,c),!l)return null;return o(o(Gc(new Lh(16),e),h),l)}function te(a,b,c){for(var d=!1,e=a.m;e;e=e.b)if(e.a==3){d=!0;break}return d||u(a.a,b,'This statement cannot be used outside a loop'),Kb(a,b,c)}function Kb(a,b,c){return A(a,90),x(c,B(a,b))}function ue(a,b,c,d,e,f){var h=z(a).a;if(!c&&z(a).b^96){var l=Ae(bb,a,0,d);return l&&Kb(a,b,o(new Lh(8),l))}if(!A(a,96))return null;if(Q(a,85))return og(c,d,h,a,f);var m=ze(c,d,h,a,f);return m&&x(m,B(a,b))}function ve(a){var b=z(a),c=b.c;if(!c)return null;for(var d=b.a.b,e=null,f=c.length-1|0;f>-1;f=f-1|0){for(var h=c[f],l=h.a.b.slice(h.c,d),m=0,g=0;g<l.length;g=g+1|0){var i=l.charCodeAt(g);(i==13||i==10)&&(m=m+1|0,i==13&&(g+1|0)<l.length&&l.charCodeAt(g+1|0)==10&&(g=g+1|0))}if(m>1)break;(e||(e=[])).push(N(h)),d=h.b}return e&&e.reverse(),e}function Ya(a,b){var c=z(a);switch(c.b){case 4:return te(a,E(a).a,new Lh(4));case 9:
|
|
39
|
+
return te(a,E(a).a,new Lh(5));case 10:return Kb(a,E(a).a,new Lh(6));case 11:return cg(a);case 44:case 45:return dg(a);case 91:return fg(a);case 15:return gg(a);case 17:return hg(a);case 83:return xe(a);case 31:return lg(a);case 32:return kg(a);case 90:return x(new Lh(3),E(a).a);case 92:return ig(a);case 43:return jg(a)}var d=ve(a),e=od(a,b),f=null;if(Q(a,35)){var h=mg(a,e,d);return h&&x(h,B(a,c.a))}if(e){if(f=Lb(a,1),!f)return null}else f=Lb(a,0);if(f)return ue(a,c.a,e,f,1,d);var l=U(bb,a,0);return l&&Kb(a,c.a,o(new Lh(8),l))}function we(a,b){if(b.b^17&&b.b^16){var c=a.m.a==1||a.m.a==4,d=b.b==9||b.b==11||b.b==14||b.b==18;d&&!c?u(a.a,b.c,'This statement cannot be used inside a function'):!d&&c&&u(a.a,b.c,'This statement cannot be used outside a function')}}function ng(a,b){var c=z(a).a;if(!A(a,98))return!1;var d=null;try{d=JSON.parse(N(c))}catch(m){return u(a.a,c,'Invalid string literal'),!1}var e=a.c.b;if(!e)return u(a.a,c,'Cannot include files without access to a file system'),!1;var f=e(d,c.a.a);if(!f)return u(a.a,
|
|
40
|
+
c,'Cannot read the file '+JSON.stringify(d)),!1;if(a.e.has(f.a))return!0;Oa(a.e,f.a,!0),a.f.push(new Nh(c,Gg(f)));var h=Nc(a.a,f,0),l=new Oh(a.a,h,a.c,a.d,a.e);return l.m=a.m,!kc(l,b,1)||!A(l,99)?!1:!0}function xe(a){var b=z(a),c=new Lh(3);return a.m=new Xh(2,a.m),!A(a,83)||!kc(a,c,2)||!A(a,87)?null:(Nb(a),x(c,B(a,b.a)))}function od(a,b){for(var c=0;;){var d=z(a).b;switch(d){case 2:c|=1;break;case 8:c|=2;break;case 16:c|=4;break;case 18:c|=8;break;case 19:c|=16;break;case 25:c|=32;break;case 29:c|=64;break;case 30:c|=128;break;case 37:c|=256;break;case 38:c|=512;break;default:return c}(!b&&(d==2||d==37||d==38)||b==3&&d^25&&d^29&&d^16||b&&(d==18||d==30||d==19))&&u(a.a,z(a).a,'Cannot use this qualifier here'),E(a)}}function Lb(a,b){var c=z(a),d=null;switch(c.b){case 3:d=aa;break;case 5:d=Tb;break;case 6:d=Ub;break;case 7:d=Vb;break;case 14:d=$;break;case 20:d=fa;break;case 22:d=yb;break;case 23:d=zb;break;case 24:d=Ab;break;case 26:d=ob;break;case 27:d=pb;break;case 28:d=qb;break;case 33:d=Pg;break;case 34:d=Qg;
|
|
41
|
+
break;case 39:d=Ga;break;case 40:d=Ha;break;case 41:d=Ia;break;case 42:d=Hd;break;case 96:var e=xd(a.m,N(c.a));if(!e||!(e instanceof ac))return b^1||Mb(a),null;d=M(e);break;default:return b^1||Mb(a),null}return E(a),x(s(new Lh(26),d),B(a,c.a))}function og(a,b,c,d,e){var f=d.m,h=new mc(wc(d.c),c,N(c),new Xh(0,f));if(h.e|=d.h|a|(h.c=='main'?1024:0),h.f=e,h.k=b,d.m=h.d,Q(d,42)){if(!A(d,89))return null}else if(!Q(d,89)){for(;;){var l=od(d,0),m=Lb(d,1);if(!m)return null;var g=z(d).a;if(!A(d,96))return null;var i=new Me(wc(d.c),g,N(g),d.m,0);if(i.e|=l,i.q=m,h.n.push(i),pd(d,i),!ye(d,i))return null;if(!Q(d,81))break}if(!A(d,89))return null}var n=Aa(f.c,N(c),null),k=!Q(d,90);if(n){if(n instanceof mc){for(var p=n;p;p=p.t)if(Ig(p,h)){p.k.f!=h.k.f?Of(d.a,h.k.c,h.c,h.k.f,p.k.f,p.k.c):p.p||!k?id(d.a,h.b,p.b):(p.w=h,h.w=p,h.e|=p.e,p.e=h.e);break}h.t=n,Fg(f,h)}else return id(d.a,c,n.b),null}else Le(f,h);if(k){var t=d.h;if(d.h&=-3073,h.p=xe(d),d.h&=t,!h.p)return null}return Nb(d),x(Gc(new Lh(11),h),B(d,b.c))}function ye(a,b){
|
|
42
|
+
var c=z(a);if(Q(a,84)){if(Q(a,88))return u(a.a,B(a,c.a),'All array sizes must be specified'),!0;if(b.C=U(bb,a,0),!b.C||!A(a,88))return!1;var d=0;if(Y(a.d,b.C),qa(a.d,b.C,fa),b.C.f!=I){var e=G(b.C);if(e){if(e.b==30){var f=e.h|0;f<1?u(a.a,b.C.c,'Cannot declare an array with a size of "'+f+'"'):d=f}}else u(a.a,b.C.c,'This value must be a compile-time constant')}for(;z(a).b==84;){if(c=E(a),z(a).b^88&&!U(bb,a,0)||!A(a,88))return!1;u(a.a,B(a,c.a),'Multidimensional arrays are not a part of the language')}b.q=x(s(new Lh(26),Mg(b.q.f,d)),b.q.c)}return!0}function ze(a,b,c,d,e){for(var f=o(_(new Lh(17),d.h|a),b);;){var h=new Me(wc(d.c),c,N(c),d.m,d.m.a^1?d.m.a^4?2:3:1);if(h.e|=d.h|a,h.f=e,h.q=b,!ye(d,h))return null;var l=z(d).a,m=null;if(Q(d,69)){var g=z(d);m=U(bb,d,1),m||(m=x(s(new Lh(24),I),B(d,g.a)))}else l=null;var i=Ra(x(o(Gc(new Lh(2),h),m),B(d,h.b)),l);if(h.K=i,h.e&2&&Y(d.d,i),o(f,i),pd(d,h),!Q(d,81))return A(d,90),f;if(c=z(d).a,!A(d,96))return null}}function pd(a,b){var c=Aa(a.m.c,b.c,null);return c?(id(a.a,b.b,c.b),
|
|
43
|
+
!1):(Le(a.m,b),!0)}function kc(a,b,c){for(;z(a).b^99&&z(a).b^87;){var d=z(a).a;if(Q(a,93)){if(c^1)return u(a.a,d,'"#include" statements cannot be used here'),Q(a,98),!1;if(!ng(a,b))return!1}else{var e=Ya(a,c);if(!e)return!1;if(e.b^13)we(a,e),o(b,e);else for(;e.g;){var f=r(e.g);we(a,f),o(b,f)}}}return!0}function qd(a,b,c,d,e,f){bb||(bb=ag());var h=new Map,l=new Oh(a,b,d,f,h);return l.m=e,kc(l,c,1)&&A(l,99),new Mh(l.f)}function z(a){return a.b[a.l]}function E(b){var a=z(b);return (b.l+1|0)<b.b.length&&(b.l=b.l+1|0),a}function B(c,a){var b=c.b[c.l>0?c.l-1|0:0];return b.a.c<a.b?a:Za(a,b.a)}function Q(b,a){return z(b).b^a?!1:(E(b),!0)}function A(e,a){if(Q(e,a))return!0;var b=z(e),c=b.a,d=(e.l>0?e.b[e.l-1|0]:b).a;return a==90||Ce(d).a^Ce(c).a?u(e.a,De(d),'Expected '+Ue[a]):u(e.a,c,'Expected '+Ue[a]+' but found '+Ue[b.b]),!1}function Mb(a){Mf(a.a,z(a))}function Nb(a){a.m=a.m.b}function Ea(e,a,b){var c=ta(e.a,a,null);if(c)b>c.a&&(c.a=b);else{var d=new Ph(b);c=d,Ba(e.a,a,d)}return c}function U(f,a,b){var c=z(a),d=ta(f.a,
|
|
44
|
+
c.b,null);if(!d||!d.b)return Mb(a),null;var e=Ae(f,a,b,d.b(a));return e}function Ae(f,a,b,c){for(;c;){var d=z(a).b,e=ta(f.a,d,null);if(!e||!e.c||e.a<=b)break;c=e.c(a,c)}return c}function R(d,a,b){Ea(d,a,0).b=function(c){return b(c,E(c))}}function Ob(h,a,b,c){Ea(h,a,0).b=function(d){var e=E(d),f=U(h,d,b);return f&&c(d,e,f)}}function Be(f,a,b,c){Ea(f,a,b).c=function(d,e){return c(d,e,E(d))}}function S(l,a,b,c){Ea(l,a,b).c=function(d,e){var f=E(d),h=U(l,d,b);return h&&c(d,e,f,h)}}function va(l,a,b,c){Ea(l,a,b).c=function(d,e){var f=E(d),h=U(l,d,b-1|0);return h&&c(d,e,f,h)}}function N(a){return a.a.b.slice(a.b,a.c)}function rd(b){var a=Rb(b.a,b.b);return b.a.a+':'+(a.a+1|0)+':'+(a.b+1|0)}function pg(b,a){return b.a==a.a&&b.b<a.c&&a.b<b.c}function lc(b,a){return b.b<=a&&a<=b.c}function sd(q,a){for(var b=Rb(q.a,q.b),c=Rb(q.a,q.c),d=Hg(q.a,b.a),e=b.b,f=c.a^b.a?d.length:c.b,h=Ye(bh,d,0),l=[],m=0,g=0;;){h.b^e||(m=l.length),h.b^f||(g=l.length);var i=Ze(h);if(i<0)break;if(i^9)l.push(i);else for(var n=0,K=8-l.length%8|0;n<K;n=n+1|0)l.push(32)}
|
|
45
|
+
var k=l.length;if(a>0&&k>a){var p=Math.min(g-m|0,a/2|0),t=Math.max((a-p|0)/2|0,3);if(m<t)d=vc(l.slice(0,a-3|0))+'...',g>(a-3|0)&&(g=a-3|0);else if((k-m|0)<(a-t|0)){var w=k-a|0;d='...'+vc(l.slice(w+3|0,k)),m=m-w|0,g=g-w|0}else{var v=m-t|0;d='...'+vc(l.slice(v+3|0,(v+a|0)-3|0))+'...',m=m-v|0,g=g-v|0,g>(a-3|0)&&(g=a-3|0)}}else d=vc(l);return new Rh(d,bc(' ',m)+((g-m|0)<2?'^':bc('~',g-m|0)))}function qg(c,a,b){return new Sh(c.a,c.b+a|0,c.b+b|0)}function Ce(a){return Rb(a.a,a.b)}function De(a){return new Sh(a.a,a.c,a.c)}function Za(a,b){return new Sh(a.a,a.b,b.c)}function rg(a){var b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'[a%53];for(a=a/53|0;a>0;)a=a-1|0,b+='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'[a%63],a=a/63|0;return b}function sg(n,a){for(var b=0,k=a.length;b<k;b=b+1|0)n.h=b,lb(n,a[b]);ug(n);var c=new Map,d=Ee(n,n.f,null);d.sort(function(e,f){return Wc(Fe(n,f),Fe(n,e))});for(var K=0,C=d.length;K<C;K=K+1|0)for(var h=d[K],l=null,v=0,q=h.length;v<q;v=v+1|0)for(var m=h[v],p=0,t=Array.from(m.c.values()),w=t.length;p<w;p=p+1|0){
|
|
46
|
+
var g=t[p],i=g.c;!(g.e&3072)&&(!n.a||n.a==1&&!(g.e&257))&&(l==null&&(l=tg(n)),g.c=l),!(g.e&2048)&&g.e&257&&Oa(c,i,g.c)}return c}function lb(f,a){var l,h;a.e&&((h=td(f,a.e)).d=h.d+1|0);for(var b=a.g;b;b=b.k)lb(f,b);switch(a.b){case 2:var c=a.e;lb(f,c.q),P(c)&&lb(f,P(c));break;case 11:var d=a.e;f.m=f.d.get(a.e.a).b,d.w&&Fd(f.f,f.m,td(f,d.w).b),lb(f,d.k);for(var m=0,g=d.n,i=g.length;m<i;m=m+1|0){var e=g[m];(l=td(f,e)).d=l.d+1|0,lb(f,e.q)}d.p&&lb(f,d.p),f.m=-1;break}}function td(c,a){var b=ta(c.d,a.a,null);return b||(b=new Uh(a.c,c.c.length),b.e=Bd(a),c.c.push(b),Ba(c.d,a.a,b),Pe(c.e),Pe(c.f)),b.c.has(c.h)||Ba(b.c,c.h,a),Bd(a)&&Fd(c.e,c.m,b.b),b}function tg(b){for(;;){var a=rg(b.l);if(b.l=b.l+1|0,!Kg.has(a)&&!Lg.has(a)&&!a.startsWith('gl_'))return a}}function Ee(h,a,b){for(var c=new Map,l=0,m=h.c,g=m.length;l<g;l=l+1|0){var d=m[l];if(!b||b(d)){var e=Qc(a,d.b),f=ta(c,e,null);f||(f=[],Ba(c,e,f)),f.push(d)}}return Array.from(c.values())}function ug(b){vg(b,Ee(b,b.e,function(a){return a.e}))}function vg(l,a){for(var b=[],g=0,i=a.length;g<i;g=g+1|0){
|
|
47
|
+
var c=a[g];c.sort(function(d,e){return Wc(e.d,d.d)});for(var f=0,m=c.length;f<m;f=f+1|0){var h=c[f];f<b.length?Fd(l.f,h.b,b[f]):b.push(h.b)}}}function Fe(d,a){for(var b=0,e=0,f=a.length;e<f;e=e+1|0){var c=a[e];b=b+c.d|0}return b}function ud(f,a){Y(f,a);for(var h=0,l=f.d,m=l.length;h<m;h=h+1|0){var b=l[h];r(b)}var c=a.g;f.d.length&&Hc(a,c,f.d[0]);for(var g=0,i=Array.from(f.e.values()),n=i.length;g<n;g=g+1|0){var d=i[g];Hc(a,c,d)}f.a.b=f.a.b.filter(function(e){return e.g==0})}function vd(b,a){a.b.a.a!='<api>'&&!a.g&&!(a.e&1024)&&b.a.b.push(a)}function Y(q,a){if(!a.f){a.f=I;var b=a.b;switch(b){case 0:case 1:wd(q,a);break;case 2:var c=a.e;vd(q,c),Y(q,c.q);var d=c.q.f;if(d==Hd&&(u(q.a,c.q.c,'Cannot create a variable of type "'+D(d)+'"'),d=I),c.C&&(ja(q,c.C),qa(q,c.C,fa)),P(c)&&(ja(q,P(c)),qa(q,P(c),d),d.d&&he(q.a,a.d,d)),c.e&2)if(P(c)){if(P(c).f!=I){var e=G(P(c));e?c.h=e:u(q.a,P(c).c,'This value must be a compile-time constant')}}else c.v^2||u(q.a,c.b,'Constants must be initialized');break;case 3:mb(q,a);break;case 4:case 5:case 6:
|
|
48
|
+
break;case 7:mb(q,a.g),Y(q,a.i),qa(q,a.i,aa);break;case 8:Y(q,a.g);break;case 9:break;case 10:kb(a)&&ja(q,kb(a)),Da(a)&&(ja(q,Da(a)),qa(q,Da(a),aa)),Ic(a)&&ja(q,Ic(a)),mb(q,a.i);break;case 11:var f=a.e;vd(q,f);for(var K=0,C=f.n,F=C.length;K<F;K=K+1|0){var h=C[K];Y(q,h.q)}Y(q,f.k),f.p&&(q.f=f.k.f,mb(q,f.p),q.f&&q.f!=Hd&&f.p.p&&u(q.a,f.b,'All control paths for "'+f.c+'" must return a value of type "'+D(q.f)+'"'),q.f=null);break;case 12:Y(q,a.g),qa(q,a.g,aa),mb(q,a.g.k),a.g.k.k&&mb(q,a.g.k.k);break;case 14:break;case 15:a.g?(Y(q,a.g),qa(q,a.g,q.f||I)):(a.f=Hd,qa(q,a,q.f||I));break;case 16:var l=a.e;vd(q,l),wd(q,a);for(var m=M(l),O=0,la=l.i,L=la.length;O<L;O=O+1|0){var g=la[O],i=g.q.f;i.d&&(m.d=!0),i.e&&(m.e=!0)}break;case 17:wd(q,a);break;case 18:q.d.push(a);break;case 19:Y(q,a.g),qa(q,a.g,aa),mb(q,a.i);break;case 20:yg(q,a);break;case 21:zg(q,a);break;case 22:var n=a.g,k=a.i,p=a.g.k;ja(q,n),qa(q,n,aa),ja(q,p),ja(q,k),p.f==I||k.f==I?a.f=I:p.f!=k.f?u(q.a,Za(p.c,k.c),'Cannot merge type "'+D(p.f)+'" and type "'+D(k.f)+'"'):p.f.d?Tf(q.a,
|
|
49
|
+
Za(p.c,k.c),p.f):a.f=p.f;break;case 23:var t=a.e;t instanceof Me?(Y(q,t.q),a.f=t.q.f):t instanceof mc&&!Zf(a)?u(q.a,a.c,'The function "'+t.c+'" must be called'):a.f=M(t);var w=t.l;w!=null&&!q.e.has(w)&&!Aa(q.b.a,w,0)&&Oa(q.e,w,_(hc(new Lh(9),w),2));break;case 25:for(var v=a.g;v;v=v.k)ja(q,v);a.f=a.i.f;break;default:kd(b)?wg(q,a):Ec(b)&&xg(q,a);break}}}function mb(c,a){if(ff(c.c,a),a.b^3)Y(c,a),Od(c.c,a);else for(var b=a.g;b;b=b.k)Y(c,b),Od(c.c,b);gf(c.c,a)}function wg(d,a){var b=a.g;ja(d,b),ld(a.b)&&Ge(d,b);var c=b.f;switch(a.b){case 31:case 33:case 34:case 35:case 36:case 37:a.f=Ng(c)?c:I;break;case 32:a.f=c==aa?aa:I;break}a.f==I&&c!=I&&u(d.a,a.d,'No unary operator "'+N(a.d)+'" for type "'+D(c)+'"')}function xg(i,a){var b=a.g,c=a.i;ja(i,b),ja(i,c),Fc(a.b)&&Ge(i,b);var d=b.f,e=c.f,f=d==e;switch(a.b){case 38:case 51:case 49:case 39:a.f=f&&ea(d)||Pc(d)&&e==$||Oc(d)&&e==fa?d:d==$&&Pc(e)||d==fa&&Oc(e)?e:a.b==49&&(d==Ga&&e==ob||d==ob&&e==Ga)?Ga:a.b==49&&(d==Ha&&e==pb||d==pb&&e==Ha)?Ha:a.b==49&&(d==Ia&&e==qb||d==qb&&e==Ia)?Ia:I;
|
|
50
|
+
break;case 40:case 50:a.f=f&&Og(d)?aa:I;break;case 46:case 47:case 48:a.f=f&&d==aa?aa:I;break;case 44:case 45:case 41:case 42:a.f=f&&(d==$||d==fa)?aa:I;break;case 52:a.f=d,d.d&&he(i.a,a.d,d),qa(i,c,d);return;case 53:case 56:case 55:case 54:a.f=f&&ea(d)||Pc(d)&&e==$||Oc(d)&&e==fa||a.b==55&&(d==Ga&&e==ob||d==Ha&&e==pb||d==Ia&&e==qb)?d:I;break;case 43:if(e==fa){var h=Dd(d);h&&(a.f=h);var l=G(c);if(l&&l.b==30){var m=l.h|0,g=Ta(d);(m<0||g&&m>=g)&&u(i.a,c.c,'Index "'+m+'" is out of bounds for type "'+D(d)+'"')}}break}a.f==I&&d!=I&&e!=I&&(a.b^43?Uf(i.a,a.d,N(a.d),d,e):u(i.a,a.d,'No index operator for type "'+D(d)+'" and type "'+D(e)+'"'))}function yg(l,a){var b=a.g;Y(l,b);for(var c=b.f,d=c.a,e=[],f=!1,h=b.k;h;h=h.k)ja(l,h),e.push(h),h.f==I&&(f=!0);if(!f){if(d){if(d instanceof mc){Ag(l,d,a,e);return}if(d instanceof ac){Bg(l,c,a,e);return}}c!=I&&u(l.a,b.c,'Cannot call type "'+D(c)+'"')}}function zg(l,a){var b=a.g,c=a.l,d=a.d;if(ja(l,b),c!=''){var e=b.f,f=ne(a);switch(e){case Tb:case yb:case Ga:case Ub:case zb:case Ha:case Vb:case Ab:case Ia:
|
|
51
|
+
a.f=Cg(l,d,e,c,f);break;case I:break;default:if(e.a&&e.a instanceof ac)for(var m=0,g=e.a.i,i=g.length;m<i;m=m+1|0){var h=g[m];if(h.c==c){a.e=h,Y(l,h.q),a.f=h.q.f;break}}a.e||u(l.a,d,'Cannot find "'+c+'" on type "'+D(e)+'"');break}}}function Ag(q,a,b,c){for(var d=[],e=a;e;e=e.t)~d.indexOf(e.w)||d.push(e);if(d.length^1&&(d=d.slice(),Gb(d,function(f){return f.n.length!=c.length}),d.length^1)){var h=d.slice();Gb(d,function(l){for(var m=0,K=c.length;m<K;m=m+1|0)if(l.n[m].q.f!=c[m].f)return!0;return!1}),d.length^1&&(d=h,Gb(d,function(g){for(var i=0,C=c.length;i<C;i=i+1|0){var n=g.n[i].q.f,k=c[i].f,p=Fa(n),t=Fa(k);if(n!=k&&(!p||!t||p^t))return!0}return!1}))}if(d.length^1)u(q.a,b.g.c,'No matching overload for function "'+a.c+'"');else{var w=d[0];if(w.n.length^c.length)Rf(q.a,b.d,w.n.length,c.length,w.c,w.b);else for(var v=0,F=c.length;v<F;v=v+1|0)qa(q,c[v],w.n[v].q.f);b.g.e=w,b.f=w.k.f}}function Bg(w,a,b,c){if(b.f=a,a!=I)if(ea(a)){for(var d=Fa(a),e=!1,f=0,v=0,q=c.length;v<q;v=v+1|0){var h=c[v],l=h.f,m=Fa(l);if(!ea(l)){
|
|
52
|
+
l!=I&&u(w.a,h.c,'Cannot use value of type "'+D(l)+'" when constructing type "'+D(a)+'"');return}f>=d&&Pf(w.a,h.c,a,d,f+m|0),$a(l)&&(e=!0),f=f+m|0}var g=$a(a)&&e;g&&c.length^1?u(w.a,b.d,'If a matrix argument is given to a matrix constructor, it is an error to have any other arguments'):f<d&&f^1&&!g&&Qf(w.a,b.d,a,f)}else{var i=a.a,n=i.i,k=n.length,p=c.length;if(k^p)Sf(w.a,b.d,k,p,i.c,i.b);else for(var t=0;t<k;t=t+1|0)qa(w,c[t],n[t].q.f)}}function Cg(m,a,b,c,d){var e=c.length;if(e<1||e>4)return u(m.a,a,'Invalid swizzle "'+c+'" on type "'+D(b)+'"'),I;for(var f=Fa(b),g=0,i=zd(f),n=i.length;g<n;g=g+1|0){var h=i[g];if(~h.indexOf(c[0])){for(var l=1;l<e;l=l+1|0){if(h.indexOf(c[l])==-1)return u(m.a,a,'Invalid swizzle "'+c+'" on type "'+D(b)+'"'),I;if(d&&~c.slice(0,l).indexOf(c[l]))return u(m.a,qg(a,l,l+1|0),'The field "'+c[l]+'" cannot be specified multiple times when used as a storage location'),I}return Ad(ea(b),e)}}return u(m.a,a,'Invalid swizzle "'+c+'" on type "'+D(b)+'"'),I}function ja(b,a){Y(b,a),a.b==26&&a.f!=I&&(u(b.a,
|
|
53
|
+
a.c,'Unexpected type "'+D(a.f)+'"'),a.f=I)}function wd(c,a){for(var b=a.g;b;b=b.k)Y(c,b)}function Ge(c,a){d:for(var b=a;;){if(b.f==I)break;switch(b.b){case 23:(b.e.e&2||b.e.e&256)&&u(c.a,a.c,'Cannot store to this location');break d;case 21:b=b.g;break;case 43:b=b.g;break;default:u(c.a,a.c,'Cannot store to this location');break d}}}function qa(c,a,b){a.f!=b&&a.f!=I&&b!=I&&u(c.a,a.c,'Cannot convert from type "'+D(a.f)+'" to type "'+D(b)+'"')}function Dg(a,b,c){for(;;){var d=new Wh;if(c.a&&Lc(d,a),c.d&&(Jc(d,a),Kc(d,a),Eg(d,a,b)),!d.a)break}c.a&&nb(a)}function nb(a){switch(a.b){case 12:if(!a.g.k.k)return!0;var b=a.g.k,c=nb(b);return c&&b.b^3&&ia(b,o(new Lh(3),md(b))),nb(a.g.k.k);case 10:return nb(a.i);case 11:var d=a.e;d.p&&nb(d.p);break;case 19:return nb(a.i);default:for(var e=a.g;e;e=e.k)nb(e);return!1}return!1}function Jc(l,a){for(var b=a.g;b;b=b.k)Jc(l,b);switch(a.b){case 2:var c=a.e;P(c)&&Jc(l,P(c)),(c.v==2||c.v==1)&&(l.b.push(c),Ba(l.c,c.a,0),Ba(l.d,c.a,0));break;case 11:var d=a.e;Ba(l.c,d.a,0),d.p&&Jc(l,d.p);
|
|
54
|
+
break;case 23:var e=a.e.a,f=ta(l.c,e,-1);~f&&Ba(l.c,e,f+1|0),oe(a)&&(f=ta(l.d,e,-1),~f&&Ba(l.d,e,f+1|0));var h=a.e.l;h!=null&&Oa(l.e,h,0);break}}function Kc(m,a){for(var b=a.g,c=null;b;b=c)c=b.k,Kc(m,b);switch(a.b){case 2:if(Je(m,a.e)||Ke(m,a.e)||Ie(m,a.e)&&(!a.g||oa(a.g)||a.e.h))r(a),m.a=!0;else{a.g&&Kc(m,a.g);var d=a.e.C;if(d&&d.b==23){var e=He(m,d.e);e&&(a.e.C=e,m.a=!0)}}break;case 11:var f=a.e;Ie(m,f)&&!(f.e&1024)?(r(a),m.a=!0):f.p&&Kc(m,f.p);break;case 17:if(!a.g.k){var h=a.m.b;h==3||!h||h==16?r(a):h^10?H(a,new Lh(3)):H(a,new Lh(25)),m.a=!0}break;case 23:var l=He(m,a.e);l&&(ia(a,l),m.a=!0);break}}function He(b,a){return Je(b,a)?Xa(a.h):Ke(b,a)?Xa(P(a)):null}function Eg(e,a,b){for(var c=a.g,d=null;c;c=d)d=c.k,c.b==9&&!e.e.has(c.l)&&!Aa(b.a,c.l,0)&&r(c)}function Ie(b,a){return ta(b.c,a.a,-1)==0&&(!(a instanceof mc)||a.w==null||ta(b.c,a.w.a,-1)==0)}function Je(b,a){return a.h!=null&&jd(a.h.b)}function Ke(b,a){return ta(b.d,a.a,-1)==0&&P(a)!=null&&jd(P(a).b)}function Lc(y,a){for(var b=a.g,c=null;b;b=c)c=b.k,Lc(y,
|
|
55
|
+
b);switch(a.b){case 2:var d=a.e;P(d)&&Lc(y,P(d));break;case 3:for(var e=a.g;e;e=e.k)if(Wf(e.b)&&e.k){for(;e.k;)r(e.k);y.a=!0}if(a.m&&a.m.b==3){for(var f=!1,h=a.g;h;h=h.k)h.b^17||(f=!0);if(!f){me(a),y.a=!0;return}}break;case 8:if(a.m.b==3){if(oa(a.g)){r(a),y.a=!0;return}var l=a.n;if(l&&l.b==8){var m=r(a.g);o(a,o(o(new Lh(25),r(r(l).g)),m)),y.a=!0;return}}break;case 7:Mc(y,a.g),Ib(a.i)&&(ia(a,o(new Lh(3),r(a.g))),y.a=!0);break;case 10:if(Mc(y,a.i),!kb(a)&&a.n&&a.n.b==8&&(ia(a.g,r(a.n.g)),r(a.n),y.a=!0),Da(a)&&Sa(Da(a))&&(ia(Da(a),new Lh(25)),y.a=!0),a.i.b^5){for(;a.i.g&&a.i.i.b==5;)r(a.i.i),y.a=!0}else ia(a.i,new Lh(3)),y.a=!0;break;case 11:var g=a.e;g.p&&Lc(y,g.p);break;case 12:if(Mc(y,a.g.k),a.g.k.k&&Mc(y,a.g.k.k),Sa(a.g)){ia(a,r(a.g.k)),y.a=!0;return}if(Ib(a.g)){a.g.k.k?ia(a,r(a.g.k.k)):r(a),y.a=!0;return}if(a.g.k.k&&a.g.k.b==15&&a.g.k.k.b==15){var i=a.g.k.g,n=a.g.k.k.g;if(i&&n){ia(a,o(new Lh(15),s(o(o(o(new Lh(22),r(a.g)),r(i)),r(n)),i.f))),y.a=!0;return}}if(a.g.k.k&&a.g.k.b==8&&a.g.k.k.b==8){var k=a.g.k.g,p=a.g.k.k.g;
|
|
56
|
+
if(k.f==p.f){ia(a,o(new Lh(8),s(o(o(o(new Lh(22),r(a.g)),r(k)),r(p)),k.f))),y.a=!0;return}}if(!a.g.k.k&&a.g.k.b==8){var t=a.g.k.g,w=t.b==52&&t.g.b==23&&Bd(t.g.e);if(t.f==fa||t.f==$||w){var v=w?Xa(t.g):t.f==fa?s(_(new Lh(30),0),fa):s(na(new Lh(29),0),$);ia(a,o(new Lh(8),s(o(o(o(new Lh(22),r(a.g)),r(t)),v),t.f))),y.a=!0;return}}if(!a.g.k.k&&a.g.k.b==12&&!a.g.k.g.k.k){var q=a.g,K=a.g.k.g,C=a.g.k.g.k;H(q,s(o(o(new Lh(46),md(q)),r(K)),aa)),H(a.g.k,r(C)),y.a=!0;return}if(pe(a.g.k)){a.g.k.k?(Jb(a.g),r(a.g.k)):ia(a,o(new Lh(8),r(a.g))),y.a=!0;return}if(a.g.k.k&&pe(a.g.k.k)){r(a.g.k.k),y.a=!0;return}break;case 15:for(var F=a.n;F&&F.b==12&&!F.g.k.k&&F.g.k.b==15;){var O=F.g.k.g,la=a.g;if(!O||!la)break;ia(a,o(new Lh(15),s(o(o(o(new Lh(22),r(F.g)),r(O)),r(la)),O.f))),r(F),F=a.n,y.a=!0}break;case 17:for(var L=a.n;L;L=L.n){if(L.b^17)break;if(L.g.f==a.g.f&&(L.h|0)==(a.h|0)){for(;L.i!=L.g;)Hc(a,a.g.k,r(L.i));r(L),y.a=!0;return}for(var ha=L.g.k;ha;ha=ha.k){var ga=ha.g;if(ga&&!jd(ga.b))return}}break;case 19:var Z=a.g,ba=a.i;ia(a,
|
|
57
|
+
qe(null,r(Z),null,r(ba))),y.a=!0;break;case 22:var sa=a.g,ca=a.g.k,ma=a.i;if(Sa(sa)){H(a,r(ca)),y.a=!0;return}if(Ib(sa)){H(a,r(ma)),y.a=!0;return}if(ca.b==ma.b&&Ec(ca.b)&&pa(ca.g,ma.g)&&ca.b^43){var ya=ca.g,La=ca.i,ka=ma.i;if(La.f==ka.f){var cb=o(o(o(new Lh(22),r(sa)),r(La)),r(ka));cb.f=La.f,H(a,o(o(new Lh(ca.b),r(ya)),cb)),y.a=!0;return}}if(ca.b==52&&pa(ca.g,ma)&&oa(ma)){var Ma=ca.g,Ua=ca.i,wa=o(o(o(new Lh(22),r(sa)),r(Ua)),r(ma));wa.f=Ua.f,H(a,o(o(new Lh(52),r(Ma)),wa)),y.a=!0;return}break;case 25:for(var za=a.g,db=null;za!=a.i;za=db)db=za.k,oa(za)&&(r(za),y.a=!0);if(a.m.b==25){me(a),y.a=!0;return}if(le(a)){H(a,r(a.g)),y.a=!0;return}break;case 31:var Ja=a.g;Ja.b^31?Ja.b^30?Ja.b^29||Pb(y,a,-Ja.h):Qb(y,a,-(Ja.h|0)|0):(H(a,r(Ja.g)),y.a=!0);break;case 32:var Ka=a.g;Ka.b^32?Ka.b^28||T(y,a,!!!Ka.h):(H(a,r(Ka.g)),y.a=!0);break;case 33:H(a,r(a.g));break;case 38:var eb=a.g,rb=a.i;ic(eb,0)?(H(a,r(rb)),y.a=!0):ic(rb,0)?(H(a,r(eb)),y.a=!0):eb.b==30&&rb.b==30?Qb(y,a,(eb.h|0)+(rb.h|0)|0):eb.b==29&&rb.b==29&&Pb(y,a,eb.h+rb.h);
|
|
58
|
+
break;case 20:var sb=a.g;if(sb.b==26){var Wb=sb.f;if(Wb==fa){var tb=sb.k;tb&&!tb.k&&tb.b==30&&(H(a,r(tb)),y.a=!0)}else if(Wb==$){var nc=sb.k;nc&&!nc.k&&nc.b==30&&Pb(y,a,nc.h|0)}else if(ea(Wb)==$)for(var ab=sb.k;ab;ab=ab.k)if(ab.b==29){var Rc=ab.h,fb=Rc|0;Rc==fb&&Qb(y,ab,fb)}}break;case 39:var gb=a.g,ub=a.i;ic(ub,1)?(H(a,r(gb)),y.a=!0):gb.b==30&&ub.b==30?Qb(y,a,ub.h|0?(gb.h|0)/(ub.h|0)|0:0):gb.b==29&&ub.b==29&&Pb(y,a,ub.h!=0?gb.h/ub.h:0);break;case 40:var vb=a.g,Xb=a.i;pa(vb,Xb)&&oa(vb)?(T(y,a,!0),y.a=!0):vb.b==30&&Xb.b==30?T(y,a,(vb.h|0)==(Xb.h|0)):vb.b==29&&Xb.b==29&&T(y,a,vb.h==Xb.h);break;case 41:var Bb=a.g,Yb=a.i;Bb.b==30&&Yb.b==30?T(y,a,(Bb.h|0)>(Yb.h|0)):Bb.b==29&&Yb.b==29&&T(y,a,Bb.h>Yb.h);break;case 42:var Cb=a.g,Na=a.i;Cb.b^30?Na.b^30?Cb.b==30&&Na.b==30?T(y,a,(Cb.h|0)>=(Na.h|0)):Cb.b==29&&Na.b==29&&T(y,a,Cb.h>=Na.h):(a.b=41,_(Na,(Na.h|0)-1|0),y.a=!0):(a.b=41,_(Cb,(Cb.h|0)+1|0),y.a=!0);break;case 43:var Sc=a.g,oc=a.i,Gd=Sc.f;if(oc.b==30){var Tc=oc.h|0,pc=0;switch(Gd){case Tb:case yb:case Ga:pc=2;break;
|
|
59
|
+
case Ub:case zb:case Ha:pc=3;break;case Vb:case Ab:case Ia:pc=4;break}Tc>-1&&Tc<pc&&(H(a,s(hc(o(new Lh(21),r(Sc)),'xyzw'[Tc]),a.f)),y.a=!0)}break;case 44:var Zb=a.g,qc=a.i;Zb.b==30&&qc.b==30?T(y,a,(Zb.h|0)<(qc.h|0)):Zb.b==29&&qc.b==29&&T(y,a,Zb.h<qc.h);break;case 45:var Db=a.g,wb=a.i;Db.b^30?wb.b^30?Db.b==30&&wb.b==30?T(y,a,(Db.h|0)<=(wb.h|0)):Db.b==29&&wb.b==29&&T(y,a,Db.h<=wb.h):(a.b=44,_(wb,(wb.h|0)+1|0),y.a=!0):(a.b=44,_(Db,(Db.h|0)-1|0),y.a=!0);break;case 46:var xa=a.g,Eb=a.i;xa.b==28&&Sa(xa)?(H(a,r(Eb)),y.a=!0):xa.b==28&&Ib(xa)?T(y,a,!1):xa.b==28&&Eb.b==28&&T(y,a,!!xa.h&&!!Eb.h);break;case 47:var Va=a.g,Uc=a.i;Va.b==28&&Ib(Va)?(H(a,r(Uc)),y.a=!0):Va.b==28&&Sa(Va)?T(y,a,!0):Va.b==28&&Uc.b==28&&T(y,a,!!Va.h&&!!Uc.h);break;case 48:var uc=a.g,Vc=a.i;uc.b==28&&Vc.b==28&&T(y,a,!!uc.h!=!!Vc.h);break;case 49:var xb=a.g,_b=a.i;xb.b==30&&(xb.h|0)==1?(H(a,r(_b)),y.a=!0):_b.b==30&&(_b.h|0)==1?(H(a,r(xb)),y.a=!0):xb.b==30&&_b.b==30?Qb(y,a,sh(xb.h|0,_b.h|0)):xb.b==29&&_b.b==29&&Pb(y,a,xb.h*_b.h);break;case 50:var rc=a.g,$b=a.i;
|
|
60
|
+
pa(rc,$b)&&oa(rc)?(T(y,a,!1),y.a=!0):rc.b==30&&$b.b==30?T(y,a,(rc.h|0)!=($b.h|0)):rc.b==29&&$b.b==29&&T(y,a,rc.h!=$b.h);break;case 51:var sc=a.g,Fb=a.i;ic(sc,0)?(H(a,s(o(new Lh(31),r(Fb)),a.f)),y.a=!0):ic(Fb,0)?(H(a,r(sc)),y.a=!0):sc.b==30&&Fb.b==30?Qb(y,a,(sc.h|0)-(Fb.h|0)|0):sc.b==29&&Fb.b==29&&Pb(y,a,sc.h-Fb.h);break}}function T(c,a,b){H(a,s(s(Ca(new Lh(28),b),aa),aa)),c.a=!0}function Pb(c,a,b){H(a,s(s(na(new Lh(29),b),$),$)),c.a=!0}function Qb(c,a,b){H(a,s(s(_(new Lh(30),b),fa),fa)),c.a=!0}function Mc(b,a){a.b==3&&le(a)&&(ia(a,r(a.g)),b.a=!0)}function Le(b,a){Oa(b.c,a.c,a)}function Fg(b,a){Oa(b.c,a.c,a)}function xd(c,a){var b=Aa(c.c,a,null);return b||c.b&&xd(c.b,a)}function Gg(a){return new Sh(a,0,a.b.length)}function Hg(d,a){if(yd(d),a<0||a>=d.d.length)return'';var b=d.d[a],c=(a+1|0)<d.d.length?d.d[a+1|0]-1|0:d.b.length;return d.b.slice(b,c)}function Rb(h,a){yd(h);for(var b=h.d.length,c=0;b>0;){var d=b/2|0,e=c+d|0;h.d[e]<=a?(c=e+1|0,b=(b-d|0)-1|0):b=d}var f=c>0?a-h.d[c-1|0]|0:a;return new Yh(c-1|0,f)}function Sb(d,a,b){
|
|
61
|
+
if(yd(d),a>-1&&a<d.d.length){var c=d.d[a];if(b>-1&&(c+b|0)<((a+1|0)<d.d.length?d.d[a+1|0]:d.b.length))return c+b|0}return-1}function yd(b){if(!b.d){b.d=[0];for(var a=0,c=b.b.length;a<c;a=a+1|0)b.b.charCodeAt(a)^10||b.d.push(a+1|0)}}function zd(a){switch(a){case 2:return eh;case 3:return fh;case 4:return gh}return null}function Ad(a,b){switch(a){case aa:switch(b){case 1:return aa;case 2:return Tb;case 3:return Ub;case 4:return Vb}break;case $:switch(b){case 1:return $;case 2:return Ga;case 3:return Ha;case 4:return Ia}break;case fa:switch(b){case 1:return fa;case 2:return yb;case 3:return zb;case 4:return Ab}break}return null}function Bd(a){return a instanceof Me&&(a.v==0||a.v==2)}function M(a){return a.m||(a.m=new ai(a,null,0)),a.m}function Ig(c,a){if(c.n.length^a.n.length)return!1;for(var b=0,d=c.n.length;b<d;b=b+1|0)if(c.n[b].q.f!=a.n[b].q.f)return!1;return!0}function P(a){var b;return (b=a.K)&&b.g}function Nc(a,b,c){for(var d=b.b.split(hh),e=[],f=null,h=0,l=0,m=0,q=d.length;m<q;m=m+1|0){var g=d[m],i=g.length,n=l+i|0,k=new Sh(b,
|
|
62
|
+
l,n);if(m%2){var p=g.charCodeAt(0);if(p>64&&p<91||p>96&&p<123||p==95){var t=Aa(Kg,g,99);t^99?e.push(new $h(k,t,f)):Lg.has(g)?Lf(a,k):e.push(new $h(k,96,f))}else if(p>47&&p<58||p==46&&i>1)e.push(new $h(k,ih.test(g)?97:95,f));else if(p^35){if(p^34){var v=Aa(jh,g,99);v^99||(g.startsWith('//')?c^1?(f||(f=[])).push(k):v=0:g.startsWith('/*')&&(c^1?(f||(f=[])).push(k):v=1)),v^99&&e.push(new $h(k,v,f))}else e.push(new $h(k,98,f))}else{var w=94;switch(g){case'#version':w=92;break;case'#extension':w=91;break;case'#include':w=93;break}e.push(new $h(k,w,f))}}else if(g!=''){u(a,k,'Syntax error "'+g+'"');break}e.length^h&&(f=null,h=e.length),l=n}return e.push(new $h(new Sh(b,l,l),99,f)),e}function Ne(a){return a.b?Ne(a.b):a}function Mg(c,a){c.f||(c.f=new Map);var b=ta(c.f,a,null);return b||(Ba(c.f,a,b=new ai(null,c,a)),b.d=!0,b.e=c.e),b}function D(a){return a.b?a.c?D(a.b)+'['+a.c+']':D(a.b)+'[]':a.a.c}function Ta(a){switch(a){case Tb:case Ga:case yb:case ob:return 2;case Ub:case Ha:case zb:case pb:return 3;case Vb:case Ia:case Ab:case qb:
|
|
63
|
+
return 4}return a.c}function Dd(a){switch(a){case Tb:case Ub:case Vb:return aa;case Ga:case Ha:case Ia:return $;case yb:case zb:case Ab:return fa;case ob:return Ga;case pb:return Ha;case qb:return Ia}return a.b}function Fa(a){switch(a){case aa:case $:case fa:return 1;case Tb:case Ga:case yb:return 2;case Ub:case Ha:case zb:return 3;case Vb:case Ia:case Ab:case ob:return 4;case pb:return 9;case qb:return 16}return 0}function ea(a){switch(a){case aa:case Tb:case Ub:case Vb:return aa;case $:case Ga:case Ha:case Ia:case ob:case pb:case qb:return $;case fa:case yb:case zb:case Ab:return fa}return null}function Ed(a){switch(a){case Tb:case Ub:case Vb:case yb:case zb:case Ab:case Ga:case Ha:case Ia:return!0}return!1}function $a(a){switch(a){case ob:case pb:case qb:return!0}return!1}function Oc(a){switch(a){case fa:case yb:case zb:case Ab:return!0}return!1}function Pc(a){switch(a){case $:case Ga:case Ha:case Ia:return!0;case ob:case pb:case qb:return!0}return!1}function Ng(a){return Oc(a)||Pc(a)}function Og(a){return !a.e&&!a.d}
|
|
64
|
+
function Oe(a){return a.e=!0,a}function Pe(b){var a=b.a.length;return b.a.push(a),a}function Fd(c,a,b){c.a[Qc(c,a)]=Qc(c,b)}function Qc(c,a){var b=c.a[a];return b^a&&(b=Qc(c,b),c.a[a]=b),b}function ra(a,b){Qe(a),process.stdout.write(b),Qe(0)}function Sg(a){ra(3,'error: '),ra(1,a+'\n')}function Tg(a){ra(2,'note: '),ra(1,a+'\n')}function Ug(a){ra(7,'warning: '),ra(1,a+'\n')}function Re(a){for(var b=process.stdout.columns,m=0,g=a.a,i=g.length;m<i;m=m+1|0){var c=g[m];c.b&&ra(1,rd(c.b)+': ');switch(c.a){case 1:Ug(c.c);break;case 0:Sg(c.c);break}if(c.b){var d=sd(c.b,b);ra(2,d.a+'\n'),ra(4,d.b+'\n')}if(c.d){ra(1,rd(c.d)+': '),Tg(c.e);var e=sd(c.d,b);ra(2,e.a+'\n'),ra(4,e.b+'\n')}}var f=a.d!=0,h=a.c!=0,l='';h&&(l+=a.c+' warning'+(a.c^1?'s':''),f&&(l+=' and ')),f&&(l+=a.d+' error'+(a.d^1?'s':'')),(h||f)&&process.stdout.write(l+' generated\n')}function Se(a){if(th(a))return[new Zh('<stdin>',a)];if(a instanceof Array){for(var b=[],c=0,e=a.length;c<e;c=c+1|0){var d=a[c];b.push(new Zh(uh(d.name),uh(d.contents)))}return b}return[new Zh(uh(a.name),
|
|
65
|
+
uh(a.contents))]}function Te(a){return function(b,c){var d=a(b,c);if(th(d))return new Zh(b,d);if(!d)return null;var e=d.name,f=d.contents;if(th(e)&&th(f))return new Zh(e,f);throw new Error('Invalid file access result')}}function Vg(){var a=process.argv.slice(2),b=new vh,c=[],d=0,e=null,f=require('fs'),h=require('path');b.e=function(l,m){var g=h.resolve(h.dirname(m),l);try{return new Zh(g,f.readFileSync(g,'utf8'))}catch(q){}return null};for(var w=0,v=a.length;w<v;w=w+1|0){var i=a[w];if(i.startsWith('-'))switch(i){case'--disable-rewriting':b.a=!1;break;case'--pretty-print':b.b=!1;break;case'--keep-symbols':b.d=!1;break;case'--help':case'-h':console.log("\nUsage: glslx [sources] [flags]\n\n --output=PATH\n Set the path to the output file. Defaults to standard out.\n\n --format=FORMAT\n Set the output format, must be json, js, c++, skew or rust. Defaults to json.\n\nAdvanced:\n\n --disable-rewriting\n Disable syntax tree rewriting, useful to check for driver bugs.\n\n --pretty-print\n Format the output nicely instead of minifying it.\n\n --renaming=MODE\n Valid modes are all, internal-only, or none. Defaults to all.\n\n --keep-symbols\n Don't inline constants or remove unused symbols.\n");
|
|
66
|
+
return;default:if(i.startsWith('--output='))e=i.slice(9);else if(i.startsWith('--format=')){var n=i.slice(9);We.has(n)||(console.log('invalid output format "'+n+'"'),process.exit(1)),d=We.get(n)}else if(i.startsWith('--renaming=')){var k=i.slice(11);Xe.has(k)||(console.log('invalid symbol renaming mode "'+k+'"'),process.exit(1)),b.c=Xe.get(k)}else console.log('invalid flag "'+i+'"'),process.exit(1);break}else c.push(new Zh(h.resolve(i),f.readFileSync(i,'utf8')))}if(c.length){var p=new Kh,t=Nd(p,c,b);t?e!=null?(f.writeFileSync(e,Yc(t,d)),Re(p)):process.stdout.write(Yc(t,d)):(Re(p),process.exit(1))}else console.log("\nUsage: glslx [sources] [flags]\n\n --output=PATH\n Set the path to the output file. Defaults to standard out.\n\n --format=FORMAT\n Set the output format, must be json, js, c++, skew or rust. Defaults to json.\n\nAdvanced:\n\n --disable-rewriting\n Disable syntax tree rewriting, useful to check for driver bugs.\n\n --pretty-print\n Format the output nicely instead of minifying it.\n\n --renaming=MODE\n Valid modes are all, internal-only, or none. Defaults to all.\n\n --keep-symbols\n Don't inline constants or remove unused symbols.\n")}
|
|
67
|
+
function ci(){var a=(function(){return this})(),b=typeof exports!=='undefined'?exports:a.GLSLX={};b.compile=lh,b.compileIDE=mh,b.format=nh,typeof require!=='undefined'&&typeof module!=='undefined'&&require.main===module&&Vg()}function jd(a){return a>27&&a<31}function kd(a){return a>30&&a<38}function Vf(a){return a>30&&a<36}function ld(a){return a>33&&a<38}function Ec(a){return a>37&&a<57}function Fc(a){return a>51&&a<57}function Wf(a){return a==4||a==5||a==6||a==15}function ie(a){return a==7||a==10||a==19}function _a(b){var a='';return b&1&&(a+='attribute '),b&2&&(a+='const '),b&256&&(a+='uniform '),b&512&&(a+='varying '),b&4&&(a+='highp '),b&32&&(a+='lowp '),b&64&&(a+='mediump '),b&8&&(a+='in '),b&16&&(a+='inout '),b&128&&(a+='out '),a}function Jg(a){return a>49&&a<80}function Cd(a){switch(a){case 96:case 42:case 33:case 34:case 14:case 39:case 40:case 41:case 20:case 22:case 23:case 24:case 3:case 5:case 6:case 7:case 26:case 27:case 28:return!0}return!1}function Qe(a){process.stdout.isTTY&&process.stdout.write('\x1B[0;'+kh.get(a)+'m')}
|
|
68
|
+
function hb(b,a){return b[b.length-1|0]=a}function Xc(a){return a[a.length-1|0]}function bf(c,a){for(var d=0,e=a.length;d<e;d=d+1|0){var b=a[d];c.push(b)}}function Gb(d,a){for(var b=0,c=0,e=d.length;c<e;c=c+1|0)a(d[c])||(b<c&&(d[b]=d[c]),b=b+1|0);for(;b<d.length;)d.pop()}function Oa(c,a,b){return c.set(a,b),b}function j(c,a,b){return c.set(a,b),c}function Aa(d,a,b){var c=d.get(a);return c!==void 0?c:b}function Ba(c,a,b){return c.set(a,b),b}function Pa(c,a,b){return c.set(a,b),c}function ta(d,a,b){var c=d.get(a);return c!==void 0?c:b}function Wc(b,a){return (a<b|0)-(a>b|0)|0}function vc(a){for(var b=new ph,d=0,e=a.length;d<e;d=d+1|0){var c=a[d];b.a+=_e(c)}return b.a}function af(b,a){return (a<b|0)-(a>b|0)|0}function bc(d,a){for(var b='',c=0;c<a;c=c+1|0)b+=d;return b}function _e(a){return a<65536?String.fromCharCode(a):String.fromCharCode((a-65536>>10)+55296|0)+String.fromCharCode((a-65536&1023)+56320|0)}function tc(a){if(!a)return null;var b=a.a,c=Rb(b,a.b),d=Rb(b,a.c);return{source:b.a,start:{line:c.a,column:c.b},
|
|
69
|
+
end:{line:d.a,column:d.b}}}function lh(a,b){b=b||{};var c=Se(a),d=new Kh,e=new vh;e.c=Aa(Xe,b.renaming,0),b.disableRewriting&&(e.a=!1),b.prettyPrint&&(e.b=!1),b.keepSymbols&&(e.d=!1),b.fileAccess&&(e.e=Te(b.fileAccess));var f=Nd(d,c,e);return{log:Jf(d),output:f?Yc(f,Aa(We,b.format,0)):null}}function mh(a,b){b=b||{};var c=Se(a),d=new Kh,e=new vh;b.fileAccess&&(e.e=Te(b.fileAccess));var f=cf(d,c,e),h=function(l){for(var Vc,m=l.source+'',g=l.line|0,i=l.column|0,n=!!l.ignoreDiagnostics,k=null,p=null,t=null,$b=0,sc=c.length;$b<sc;$b=$b+1|0){var w=c[$b];if(w.a==m){var v=Sb(w,g,i);if(~v){if(!n&&d)for(var xb=0,_b=d.a,rc=_b.length;xb<rc;xb=xb+1|0){var q=_b[xb];if(q.b&&q.b.a==w&&lc(q.b,v)){p=new Bh(q.c,''),k=q.b;break}}if(!p&&f){var K=new Ch(w,v);Qa(K,f.a),p=Cf(K),p&&(k=K.e,t=(Vc=K.d)&&Vc.c)}}break}}return{tooltip:p&&p.a,range:tc(k),symbol:t,documentation:p&&p.b}},C=function(F){for(var O=F.source+'',la=F.line|0,L=F.column|0,ha=null,ga=null,Z=null,Fb=0,y=f.b,Xg=y.length;Fb<Xg;Fb=Fb+1|0){var ba=y[Fb];if(ba.a.a.a==O){var sa=Sb(ba.a.a,
|
|
70
|
+
la,L);if(~sa&&lc(ba.a,sa))return{definition:tc(ba.b),range:tc(ba.a),symbol:ba.b.a.a}}}for(var Id=0,Yg=c.length;Id<Yg;Id=Id+1|0){var ca=c[Id];if(ca.a==O){var ma=Sb(ca,la,L);if(~ma&&f){var ya=new Ch(ca,ma);Qa(ya,f.a),ya.d&&ya.d.b&&ya.d.b.a.a!='<api>'&&(ga=ya.d.b,ha=ya.e,Z=ya.d.c)}break}}return{definition:tc(ga),range:tc(ha),symbol:Z}},La=function(ka){for(var cb=ka.source+'',Ma=null,Jd=0,Zg=c.length;Jd<Zg;Jd=Jd+1|0){var Ua=c[Jd];if(Ua.a==cb){if(f){var wa=new Dh(Ua);ce(wa,f.a),Ma=wa.b.map(function(za){return{name:za.c,kind:za instanceof Me?'variable':za instanceof mc?'function':za instanceof ac?'struct':null,range:tc(za.b)}})}break}}return{symbols:Ma}},db=function(Ja){for(var Ka=Ja.source+'',eb=Ja.line|0,rb=Ja.column|0,sb=null,Wb=null,Kd=0,_g=c.length;Kd<_g;Kd=Kd+1|0){var tb=c[Kd];if(tb.a==Ka){var nc=Sb(tb,eb,rb);if(~nc&&f){var ab=new Eh(tb,nc);Ff(ab,f.a),ab.d&&ab.d.b&&ab.d.b.a.a!='<api>'&&(sb=ab.c.map(tc),Wb=ab.d.c)}break}}return{ranges:sb,symbol:Wb}},Rc=function(fb){for(var gb=fb.source+'',ub=fb.line|0,vb=fb.column|0,Xb=[],Ld=0,$g=c.length;Ld<$g;Ld=Ld+1|0){
|
|
71
|
+
var Bb=c[Ld];if(Bb.a==gb){var Yb=Sb(Bb,ub,vb);if(~Yb&&f){var Cb=new Gh(Bb,Yb);If(Cb,f.a),Xb=Cb.d.map(function(Na){return{kind:Na.a,name:Na.b,detail:Na.c,documentation:Na.d}})}}}return{completions:Xb}},Sc=function(oc){for(var Gd=oc.source+'',Tc=oc.line|0,pc=oc.column|0,Zb=[],qc=-1,Db=-1,Md=0,ah=c.length;Md<ah;Md=Md+1|0){var wb=c[Md];if(wb.a==Gd){var xa=Sb(wb,Tc,pc);if(~xa&&f){var Eb=new Ih(wb,xa);hd(Eb,f.a),qc=Eb.d,Db=Eb.e,Zb=Eb.c.map(function(Va){return{text:Va.a,'arguments':Va.b,documentation:Va.c}})}}}return{signatures:Zb,activeArgument:qc,activeSignature:Db}};return{unusedSymbols:d.b.map(function(Uc){return{name:Uc.c,range:tc(Uc.b)}}),diagnostics:d.a.map(function(uc){return{kind:oh[uc.a].toLowerCase(),range:tc(uc.b),text:uc.c}}),tooltipQuery:h,definitionQuery:C,symbolsQuery:La,renameQuery:db,completionQuery:Rc,signatureQuery:Sc}}function nh(a,b){b=b||{};var c='indent'in b?uh(b.indent):' ',d='newline'in b?uh(b.newline):'\n',e=2;if('trailingNewline'in b){var f=uh(b.trailingNewline);switch(f){case'preserve':e=0;
|
|
72
|
+
break;case'remove':e=1;break;case'insert':e=2;break;default:throw new Error('Invalid "trailingNewline" value: '+f)}}return Bf(uh(a),c,d,e)}function ph(){this.a=''}function qh(){this.a='',this.b=0,this.c=0}function vh(){this.a=!0,this.b=!0,this.c=0,this.d=!0,this.e=null}function wh(a){this.a=new Map,this.b=a,this.c=0}function xh(a,b){this.a=a,this.b=b}function yh(a,b){this.a=a,this.b=b}function zh(){this.a=[],this.b=[]}function Ah(a,b){this.a='',this.b='',this.c='\n',this.d=' ',this.e=b.b,this.e&&(this.d='',this.c='');for(var c=null,d=a.g;d;d=d.k)jf(this,d)||(c&&hf(c,d)&&(this.a+=this.c),Wa(this,d),this.a+=this.c,c=d)}function Bh(a,b){this.a=a,this.b=b}function Ch(a,b){this.a=a,this.b=b,this.c=null,this.d=null,this.e=null,this.f=null,this.h=null}function Dh(a){this.a=a,this.b=[]}function Eh(a,b){this.a=a,this.b=b,this.c=[],this.d=null}function Fh(a,b){this.a=a,this.b=b,this.c='',this.d=''}function Gh(a,b){this.a=a,this.b=b,this.c=new Map,this.d=[]}function Hh(a,b,c){this.a=a,this.b=b,this.c=c}function Ih(a,b){this.a=a,
|
|
73
|
+
this.b=b,this.c=[],this.d=-1,this.e=-1}function Jh(a,b,c){this.a=a,this.b=b,this.c=c,this.d=null,this.e=''}function Kh(){this.a=[],this.b=[],this.c=0,this.d=0,this.e=null}function Lh(a){this.a=re(),this.b=a,this.c=null,this.d=null,this.e=null,this.f=null,this.h=0,this.l=null,this.m=null,this.g=null,this.i=null,this.n=null,this.k=null,this.p=!1}function Mh(a){this.a=a}function Nh(a,b){this.a=a,this.b=b}function Oh(a,b,c,d,e){this.a=a,this.b=b,this.c=c,this.d=d,this.e=e,this.f=[],this.h=0,this.l=0,this.m=null}function Ph(a){this.a=a,this.b=null,this.c=null}function Qh(){this.a=new Map}function Rh(a,b){this.a=a,this.b=b}function Sh(a,b,c){this.a=a,this.b=b,this.c=c}function Uh(a,b){this.a=a,this.b=b,this.c=new Map,this.d=0,this.e=!1}function Th(a){this.a=a,this.b=[],this.c=[],this.d=new Map,this.e=new bi,this.f=new bi,this.h=0,this.l=0,this.m=-1}function Vh(a,b){this.a=a,this.b=b,this.c=new zh,this.d=[],this.e=new Map,this.f=null}function Wh(){this.a=!1,this.b=[],this.c=new Map,this.d=new Map,this.e=new Map}function Xh(a,b){
|
|
74
|
+
this.a=a,this.b=b,this.c=new Map}function Yh(a,b){this.a=a,this.b=b}function Zh(a,b){this.a=a,this.b=b,this.c=null,this.d=null}function _h(a,b,c,d){this.a=a,this.b=b,this.c=c,this.d=d,this.e=0,this.f=null,this.h=null,this.l=null,this.m=null,this.g=0}function ac(a,b,c,d){_h.call(this,a,b,c,d),this.i=[]}rh(ac,_h);function mc(a,b,c,d){_h.call(this,a,b,c,d),this.n=[],this.k=null,this.p=null,this.t=null,this.w=null}rh(mc,_h);function Me(a,b,c,d,e){_h.call(this,a,b,c,d),this.v=e,this.q=null,this.K=null,this.C=null}rh(Me,_h);function $h(a,b,c){this.a=a,this.b=b,this.c=c}function ai(a,b,c){this.a=a,this.b=b,this.c=c,this.d=!1,this.e=!1,this.f=null}function bi(){this.a=[]}var bh=new qh,Ve=0,bb=null,eg=j(j(j(j(new Map,'disable',1),'enable',2),'require',3),'warn',4),dh=j(j(j(j(new Map,'GL_OES_standard_derivatives',0),'GL_EXT_frag_depth',0),'GL_EXT_draw_buffers',0),'GL_EXT_shader_texture_lod',0),eh=['xy','st','rg'],fh=['xyz','stp','rgb'],gh=['xyzw','stpq','rgba'],hh=new RegExp('(\\.[0-9]+[eE][+-]?[0-9]+\\b|\\.[0-9]+\\b|[0-9]+\\.[0-9]+[eE][+-]?[0-9]+\\b|[0-9]+\\.[0-9]+\\b|[0-9]+\\.[eE][+-]?[0-9]+\\b|[0-9]+\\.|[0-9]+[eE][+-]?[0-9]+\\b|[1-9][0-9]*\\b|0[0-7]*\\b|0[xX][0-9A-Fa-f]+\\b|[ \t\r\n]|/\\*(?:.|\r\n|\n)*?\\*/|//.*|&&|\\|\\||\\^\\^|\\+\\+|--|<<=?|>>=?|[()[\\]{}\\.,?:;]|[+\\-*/%=!<>&|^~]=?|[A-Za-z_][A-Za-z0-9_]*\\b|#\\w+\\b|"(?:[^"\\\\]|\\\\.)*")'),ih=new RegExp('^([1-9][0-9]*|0[0-7]*|0[xX][0-9A-Fa-f]+)$'),Kg=j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(new Map,
|
|
75
75
|
'attribute',2),'bool',3),'break',4),'bvec2',5),'bvec3',6),'bvec4',7),'const',8),'continue',9),'discard',10),'do',11),'else',12),'false',13),'float',14),'for',15),'highp',16),'if',17),'in',18),'inout',19),'int',20),'invariant',21),'ivec2',22),'ivec3',23),'ivec4',24),'lowp',25),'mat2',26),'mat3',27),'mat4',28),'mediump',29),'out',30),'precision',31),'return',32),'sampler2D',33),'samplerCube',34),'struct',35),'true',36),'uniform',37),'varying',38),'vec2',39),'vec3',40),'vec4',41),'void',42),'while',43),'export',44),'import',45),jh=j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(new Map,'~',46),'--',47),'++',48),'!',49),'&',50),'|',51),'^',52),'/',53),'==',54),'>',55),'>=',56),'<',57),'<=',58),'&&',59),'||',60),'^^',61),'-',62),'*',63),'!=',64),'+',65),'%',66),'<<',67),'>>',68),'=',69),'+=',70),'&=',71),'|=',72),'^=',73),'/=',74),'*=',75),'%=',76),'<<=',77),'>>=',78),'-=',79),':',80),',',81),'.',82),'{',83),'[',84),'(',85),'?',86),'}',87),']',88),')',89),';',90),Lg=j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(j(new Map,
|
|
76
|
-
'asm',0),'cast',0),'class',0),'default',0),'double',0),'dvec2',0),'dvec3',0),'dvec4',0),'enum',0),'extern',0),'external',0),'fixed',0),'flat',0),'fvec2',0),'fvec3',0),'fvec4',0),'goto',0),'half',0),'hvec2',0),'hvec3',0),'hvec4',0),'inline',0),'input',0),'interface',0),'long',0),'namespace',0),'noinline',0),'output',0),'packed',0),'public',0),'sampler1D',0),'sampler1DShadow',0),'sampler2DRect',0),'sampler2DRectShadow',0),'sampler2DShadow',0),'sampler3D',0),'sampler3DRect',0),'short',0),'sizeof',0),'static',0),'superp',0),'switch',0),'template',0),'this',0),'typedef',0),'union',0),'unsigned',0),'using',0),'volatile',0),
|
|
77
|
-
'mat3',null)),qb=
|
|
76
|
+
'asm',0),'cast',0),'class',0),'default',0),'double',0),'dvec2',0),'dvec3',0),'dvec4',0),'enum',0),'extern',0),'external',0),'fixed',0),'flat',0),'fvec2',0),'fvec3',0),'fvec4',0),'goto',0),'half',0),'hvec2',0),'hvec3',0),'hvec4',0),'inline',0),'input',0),'interface',0),'long',0),'namespace',0),'noinline',0),'output',0),'packed',0),'public',0),'sampler1D',0),'sampler1DShadow',0),'sampler2DRect',0),'sampler2DRectShadow',0),'sampler2DShadow',0),'sampler3D',0),'sampler3DRect',0),'short',0),'sizeof',0),'static',0),'superp',0),'switch',0),'template',0),'this',0),'typedef',0),'union',0),'unsigned',0),'using',0),'volatile',0),aa=M(new ac(-1,null,'bool',null)),Tb=M(new ac(-2,null,'bvec2',null)),Ub=M(new ac(-3,null,'bvec3',null)),Vb=M(new ac(-4,null,'bvec4',null)),I=M(new ac(-5,null,'<error>',null)),$=M(new ac(-6,null,'float',null)),fa=M(new ac(-7,null,'int',null)),yb=M(new ac(-8,null,'ivec2',null)),zb=M(new ac(-9,null,'ivec3',null)),Ab=M(new ac(-10,null,'ivec4',null)),ob=M(new ac(-11,null,'mat2',null)),pb=M(new ac(-12,null,
|
|
77
|
+
'mat3',null)),qb=M(new ac(-13,null,'mat4',null)),Pg=Oe(M(new ac(-14,null,'sampler2D',null))),Qg=Oe(M(new ac(-15,null,'samplerCube',null))),Ga=M(new ac(-16,null,'vec2',null)),Ha=M(new ac(-17,null,'vec3',null)),Ia=M(new ac(-18,null,'vec4',null)),Hd=M(new ac(-19,null,'void',null)),Rg=[aa,Tb,Ub,Vb,$,fa,yb,zb,Ab,ob,pb,qb,Pg,Qg,Ga,Ha,Ia],We=j(j(j(j(j(new Map,'json',0),'js',1),'c++',2),'skew',3),'rust',4),Xe=j(j(j(new Map,'all',0),'internal-only',1),'none',2),oh=['ERROR','WARNING'],Wg=['GLOBAL','STRUCT_BLOCK','VARIABLE','BLOCK','BREAK','CONTINUE','DISCARD','DO_WHILE','EXPRESSION','EXTENSION','FOR','FUNCTION','IF','MODIFIER_BLOCK','PRECISION','RETURN','STRUCT','VARIABLES','VERSION','WHILE','CALL','DOT','HOOK','NAME','PARSE_ERROR','SEQUENCE','TYPE','UNKNOWN_CONSTANT','BOOL','FLOAT','INT','NEGATIVE','NOT','POSITIVE','PREFIX_DECREMENT','PREFIX_INCREMENT','POSTFIX_DECREMENT','POSTFIX_INCREMENT','ADD','DIVIDE','EQUAL','GREATER_THAN','GREATER_THAN_OR_EQUAL','INDEX','LESS_THAN','LESS_THAN_OR_EQUAL','LOGICAL_AND','LOGICAL_OR',
|
|
78
78
|
'LOGICAL_XOR','MULTIPLY','NOT_EQUAL','SUBTRACT','ASSIGN','ASSIGN_ADD','ASSIGN_DIVIDE','ASSIGN_MULTIPLY','ASSIGN_SUBTRACT'],Ue=['SINGLE_LINE_COMMENT','MULTI_LINE_COMMENT','ATTRIBUTE','BOOL','BREAK','BVEC2','BVEC3','BVEC4','CONST','CONTINUE','DISCARD','DO','ELSE','FALSE','FLOAT','FOR','HIGHP','IF','IN','INOUT','INT','INVARIANT','IVEC2','IVEC3','IVEC4','LOWP','MAT2','MAT3','MAT4','MEDIUMP','OUT','PRECISION','RETURN','SAMPLER2D','SAMPLERCUBE','STRUCT','TRUE','UNIFORM','VARYING','VEC2','VEC3','VEC4','VOID','WHILE','EXPORT','IMPORT','COMPLEMENT','DECREMENT','INCREMENT','NOT','BITWISE_AND','BITWISE_OR','BITWISE_XOR','DIVIDE','EQUAL','GREATER_THAN','GREATER_THAN_OR_EQUAL','LESS_THAN','LESS_THAN_OR_EQUAL','LOGICAL_AND','LOGICAL_OR','LOGICAL_XOR','MINUS','MULTIPLY','NOT_EQUAL','PLUS','REMAINDER','SHIFT_LEFT','SHIFT_RIGHT','ASSIGN','ASSIGN_ADD','ASSIGN_BITWISE_AND','ASSIGN_BITWISE_OR','ASSIGN_BITWISE_XOR','ASSIGN_DIVIDE','ASSIGN_MULTIPLY','ASSIGN_REMAINDER','ASSIGN_SHIFT_LEFT','ASSIGN_SHIFT_RIGHT','ASSIGN_SUBTRACT','COLON',
|
|
79
|
-
'COMMA','DOT','LEFT_BRACE','LEFT_BRACKET','LEFT_PARENTHESIS','QUESTION','RIGHT_BRACE','RIGHT_BRACKET','RIGHT_PARENTHESIS','SEMICOLON','EXTENSION','VERSION','INCLUDE','PRAGMA','FLOAT_LITERAL','IDENTIFIER','INT_LITERAL','STRING_LITERAL','END_OF_FILE'],kh=
|
|
79
|
+
'COMMA','DOT','LEFT_BRACE','LEFT_BRACKET','LEFT_PARENTHESIS','QUESTION','RIGHT_BRACE','RIGHT_BRACKET','RIGHT_PARENTHESIS','SEMICOLON','EXTENSION','VERSION','INCLUDE','PRAGMA','FLOAT_LITERAL','IDENTIFIER','INT_LITERAL','STRING_LITERAL','END_OF_FILE'],kh=Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(new Map,0,0),1,1),2,90),3,31),4,32),5,33),6,34),7,35),8,36);ci()})();
|