Explorar o código

Merge pull request #5320 from Chaosus/new_shader_builtins

Yuri Roubinsky %!s(int64=3) %!d(string=hai) anos
pai
achega
457d511f7f
Modificáronse 1 ficheiros con 248 adicións e 207 borrados
  1. 248 207
      tutorials/shaders/shader_reference/shading_language.rst

+ 248 - 207
tutorials/shaders/shader_reference/shading_language.rst

@@ -813,210 +813,251 @@ is used, it can be scalar or vector.
           backend, please see the :ref:`Differences between GLES2 and GLES3 doc
           <doc_gles2_gles3_differences>`.
 
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| Function                                                               | Description / Return value                                    |
-+========================================================================+===============================================================+
-| vec_type **radians** (vec_type degrees)                                | Convert degrees to radians                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **degrees** (vec_type radians)                                | Convert radians to degrees                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **sin** (vec_type x)                                          | Sine                                                          |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **cos** (vec_type x)                                          | Cosine                                                        |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **tan** (vec_type x)                                          | Tangent                                                       |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **asin** (vec_type x)                                         | Arcsine                                                       |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **acos** (vec_type x)                                         | Arccosine                                                     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **atan** (vec_type y_over_x)                                  | Arctangent                                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **atan** (vec_type y, vec_type x)                             | Arctangent to convert vector to angle                         |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **sinh** (vec_type x)                                         | Hyperbolic sine                                               |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **cosh** (vec_type x)                                         | Hyperbolic cosine                                             |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **tanh** (vec_type x)                                         | Hyperbolic tangent                                            |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **asinh** (vec_type x)                                        | Inverse hyperbolic sine                                       |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **acosh** (vec_type x)                                        | Inverse hyperbolic cosine                                     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **atanh** (vec_type x)                                        | Inverse hyperbolic tangent                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **pow** (vec_type x, vec_type y)                              | Power (undefined if ``x`` < 0 or if ``x`` = 0 and ``y`` <= 0) |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **exp** (vec_type x)                                          | Base-e exponential                                            |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **exp2** (vec_type x)                                         | Base-2 exponential                                            |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **log** (vec_type x)                                          | Natural logarithm                                             |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **log2** (vec_type x)                                         | Base-2 logarithm                                              |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **sqrt** (vec_type x)                                         | Square root                                                   |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **inversesqrt** (vec_type x)                                  | Inverse square root                                           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **abs** (vec_type x)                                          | Absolute value (returns positive value if negative)           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| ivec_type **abs** (ivec_type x)                                        | Absolute value (returns positive value if negative)           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **sign** (vec_type x)                                         | Sign (returns ``1.0`` if positive, ``-1.0`` if negative,      |
-|                                                                        | ``0.0`` if zero)                                              |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| ivec_type **sign** (ivec_type x)                                       | Sign (returns ``1`` if positive, ``-1`` if negative,          |
-|                                                                        | ``0`` if zero)                                                |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **floor** (vec_type x)                                        | Round to the integer below                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **round** (vec_type x)                                        | Round to the nearest integer                                  |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **roundEven** (vec_type x)                                    | Round to the nearest even integer                             |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **trunc** (vec_type x)                                        | Truncation                                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **ceil** (vec_type x)                                         | Round to the integer above                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **fract** (vec_type x)                                        | Fractional (returns ``x - floor(x)``)                         |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **mod** (vec_type x, vec_type y)                              | Modulo (division remainder)                                   |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **mod** (vec_type x, float y)                                 | Modulo (division remainder)                                   |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **modf** (vec_type x, out vec_type i)                         | Fractional of ``x``, with ``i`` as integer part               |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type  **min** (vec_type a, vec_type b)                             | Lowest value between ``a`` and ``b``                          |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type  **max** (vec_type a, vec_type b)                             | Highest value between ``a`` and ``b``                         |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **clamp** (vec_type x, vec_type min, vec_type max)            | Clamp ``x`` between ``min`` and ``max`` (inclusive)           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| float **mix** (float a, float b, float c)                              | Linear interpolate between ``a`` and ``b`` by ``c``           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **mix** (vec_type a, vec_type b, float c)                     | Linear interpolate between ``a`` and ``b`` by ``c``           |
-|                                                                        | (scalar coefficient)                                          |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **mix** (vec_type a, vec_type b, vec_type c)                  | Linear interpolate between ``a`` and ``b`` by ``c``           |
-|                                                                        | (vector coefficient)                                          |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **mix** (vec_type a, vec_type b, bvec_type c)                 | Linear interpolate between ``a`` and ``b`` by ``c``           |
-|                                                                        | (boolean-vector selection)                                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **fma** (vec_type a, vec_type b, vec_type c)                  | Performs a fused multiply-add operation: ``(a * b + c)``      |
-|                                                                        | (faster than doing it manually)                               |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **step** (vec_type a, vec_type b)                             | ``b[i] < a[i] ? 0.0 : 1.0``                                   |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **step** (float a, vec_type b)                                | ``b[i] < a ? 0.0 : 1.0``                                      |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **smoothstep** (vec_type a, vec_type b, vec_type c)           | Hermite interpolate between ``a`` and ``b`` by ``c``          |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **smoothstep** (float a, float b, vec_type c)                 | Hermite interpolate between ``a`` and ``b`` by ``c``          |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **isnan** (vec_type x)                                       | Returns ``true`` if scalar or vector component is ``NaN``     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **isinf** (vec_type x)                                       | Returns ``true`` if scalar or vector component is ``INF``     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| ivec_type **floatBitsToInt** (vec_type x)                              | Float->Int bit copying, no conversion                         |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| uvec_type **floatBitsToUint** (vec_type x)                             | Float->UInt bit copying, no conversion                        |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **intBitsToFloat** (ivec_type x)                              | Int->Float bit copying, no conversion                         |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **uintBitsToFloat** (uvec_type x)                             | UInt->Float bit copying, no conversion                        |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| float **length** (vec_type x)                                          | Vector length                                                 |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| float **distance** (vec_type a, vec_type b)                            | Distance between vectors i.e ``length(a - b)``                |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| float **dot** (vec_type a, vec_type b)                                 | Dot product                                                   |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec3 **cross** (vec3 a, vec3 b)                                        | Cross product                                                 |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **normalize** (vec_type x)                                    | Normalize to unit length                                      |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec3 **reflect** (vec3 I, vec3 N)                                      | Reflect                                                       |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec3 **refract** (vec3 I, vec3 N, float eta)                           | Refract                                                       |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **faceforward** (vec_type N, vec_type I, vec_type Nref)       | If ``dot(Nref, I)`` < 0, return N, otherwise –N               |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| mat_type **matrixCompMult** (mat_type x, mat_type y)                   | Matrix component multiplication                               |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| mat_type **outerProduct** (vec_type column, vec_type row)              | Matrix outer product                                          |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| mat_type **transpose** (mat_type m)                                    | Transpose matrix                                              |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| float **determinant** (mat_type m)                                     | Matrix determinant                                            |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| mat_type **inverse** (mat_type m)                                      | Inverse matrix                                                |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **lessThan** (vec_type x, vec_type y)                        | Bool vector comparison on < int/uint/float vectors            |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **greaterThan** (vec_type x, vec_type y)                     | Bool vector comparison on > int/uint/float vectors            |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **lessThanEqual** (vec_type x, vec_type y)                   | Bool vector comparison on <= int/uint/float vectors           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **greaterThanEqual** (vec_type x, vec_type y)                | Bool vector comparison on >= int/uint/float vectors           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **equal** (vec_type x, vec_type y)                           | Bool vector comparison on == int/uint/float vectors           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **notEqual** (vec_type x, vec_type y)                        | Bool vector comparison on != int/uint/float vectors           |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bool **any** (bvec_type x)                                             | ``true`` if any component is ``true``, ``false`` otherwise    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bool **all** (bvec_type x)                                             | ``true`` if all components are ``true``, ``false`` otherwise  |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| bvec_type **not** (bvec_type x)                                        | Invert boolean vector                                         |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| ivec2 **textureSize** (sampler2D_type s, int lod)                      | Get the size of a 2D texture                                  |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| ivec3 **textureSize** (sampler2DArray_type s, int lod)                 | Get the size of a 2D texture array                            |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| ivec3 **textureSize** (sampler3D s, int lod)                           | Get the size of a 3D texture                                  |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| ivec2 **textureSize** (samplerCube s, int lod)                         | Get the size of a cubemap texture                             |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **texture** (sampler2D_type s, vec2 uv [, float bias])       | Perform a 2D texture read                                     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type  **texture** (sampler2DArray_type s, vec3 uv [, float bias]) | Perform a 2D texture array read                               |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type  **texture** (sampler3D_type s, vec3 uv [, float bias])      | Perform a 3D texture read                                     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4 **texture** (samplerCube s, vec3 uv [, float bias])               | Perform a cubemap texture read                                |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureProj** (sampler2D_type s, vec3 uv [, float bias])   | Perform a 2D texture read with projection                     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureProj** (sampler2D_type s, vec4 uv [, float bias])   | Perform a 2D texture read with projection                     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type  **textureProj** (sampler3D_type s, vec4 uv [, float bias])  | Perform a 3D texture read with projection                     |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureLod** (sampler2D_type s, vec2 uv, float lod)        | Perform a 2D texture read at custom mipmap                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureLod** (sampler2DArray_type s, vec3 uv, float lod)   | Perform a 2D texture array read at custom mipmap              |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureLod** (sampler3D_type s, vec3 uv, float lod)        | Perform a 3D texture read at custom mipmap                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4 **textureLod** (samplerCube s, vec3 uv, float lod)                | Perform a 3D texture read at custom mipmap                    |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureProjLod** (sampler2D_type s, vec3 uv, float lod)    | Perform a 2D texture read with projection/LOD                 |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureProjLod** (sampler2D_type s, vec4 uv, float lod)    | Perform a 2D texture read with projection/LOD                 |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **textureProjLod** (sampler3D_type s, vec4 uv, float lod)    | Perform a 3D texture read with projection/LOD                 |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **texelFetch** (sampler2D_type s, ivec2 uv, int lod)         | Fetch a single texel using integer coordinates                |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **texelFetch** (sampler2DArray_type s, ivec3 uv, int lod)    | Fetch a single texel using integer coordinates                |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec4_type **texelFetch** (sampler3D_type s, ivec3 uv, int lod)         | Fetch a single texel using integer coordinates                |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **dFdx** (vec_type p)                                         | Derivative in ``x`` using local differencing                  |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **dFdy** (vec_type p)                                         | Derivative in ``y`` using local differencing                  |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
-| vec_type **fwidth** (vec_type p)                                       | Sum of absolute derivative in ``x`` and ``y``                 |
-+------------------------------------------------------------------------+---------------------------------------------------------------+
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| Function                                                                              | Description / Return value                                          |
++=======================================================================================+=====================================================================+
+| vec_type **radians** (vec_type degrees)                                               | Convert degrees to radians                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **degrees** (vec_type radians)                                               | Convert radians to degrees                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **sin** (vec_type x)                                                         | Sine                                                                |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **cos** (vec_type x)                                                         | Cosine                                                              |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **tan** (vec_type x)                                                         | Tangent                                                             |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **asin** (vec_type x)                                                        | Arcsine                                                             |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **acos** (vec_type x)                                                        | Arccosine                                                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **atan** (vec_type y_over_x)                                                 | Arctangent                                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **atan** (vec_type y, vec_type x)                                            | Arctangent to convert vector to angle                               |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **sinh** (vec_type x)                                                        | Hyperbolic sine                                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **cosh** (vec_type x)                                                        | Hyperbolic cosine                                                   |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **tanh** (vec_type x)                                                        | Hyperbolic tangent                                                  |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **asinh** (vec_type x)                                                       | Inverse hyperbolic sine                                             |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **acosh** (vec_type x)                                                       | Inverse hyperbolic cosine                                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **atanh** (vec_type x)                                                       | Inverse hyperbolic tangent                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **pow** (vec_type x, vec_type y)                                             | Power (undefined if ``x`` < 0 or if ``x`` = 0 and ``y`` <= 0)       |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **exp** (vec_type x)                                                         | Base-e exponential                                                  |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **exp2** (vec_type x)                                                        | Base-2 exponential                                                  |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **log** (vec_type x)                                                         | Natural logarithm                                                   |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **log2** (vec_type x)                                                        | Base-2 logarithm                                                    |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **sqrt** (vec_type x)                                                        | Square root                                                         |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **inversesqrt** (vec_type x)                                                 | Inverse square root                                                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **abs** (vec_type x)                                                         | Absolute value (returns positive value if negative)                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **abs** (ivec_type x)                                                       | Absolute value (returns positive value if negative)                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **sign** (vec_type x)                                                        | Sign (returns ``1.0`` if positive, ``-1.0`` if negative,            |
+|                                                                                       | ``0.0`` if zero)                                                    |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **sign** (ivec_type x)                                                      | Sign (returns ``1`` if positive, ``-1`` if negative,                |
+|                                                                                       | ``0`` if zero)                                                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **floor** (vec_type x)                                                       | Round to the integer below                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **round** (vec_type x)                                                       | Round to the nearest integer                                        |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **roundEven** (vec_type x)                                                   | Round to the nearest even integer                                   |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **trunc** (vec_type x)                                                       | Truncation                                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **ceil** (vec_type x)                                                        | Round to the integer above                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **fract** (vec_type x)                                                       | Fractional (returns ``x - floor(x)``)                               |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **mod** (vec_type x, vec_type y)                                             | Modulo (division remainder)                                         |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **mod** (vec_type x, float y)                                                | Modulo (division remainder)                                         |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **modf** (vec_type x, out vec_type i)                                        | Fractional of ``x``, with ``i`` as integer part                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type  **min** (vec_type a, vec_type b)                                            | Lowest value between ``a`` and ``b``                                |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type  **max** (vec_type a, vec_type b)                                            | Highest value between ``a`` and ``b``                               |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **clamp** (vec_type x, vec_type min, vec_type max)                           | Clamp ``x`` between ``min`` and ``max`` (inclusive)                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| float **mix** (float a, float b, float c)                                             | Linear interpolate between ``a`` and ``b`` by ``c``                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **mix** (vec_type a, vec_type b, float c)                                    | Linear interpolate between ``a`` and ``b`` by ``c``                 |
+|                                                                                       | (scalar coefficient)                                                |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **mix** (vec_type a, vec_type b, vec_type c)                                 | Linear interpolate between ``a`` and ``b`` by ``c``                 |
+|                                                                                       | (vector coefficient)                                                |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **mix** (vec_type a, vec_type b, bvec_type c)                                | Linear interpolate between ``a`` and ``b`` by ``c``                 |
+|                                                                                       | (boolean-vector selection)                                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **fma** (vec_type a, vec_type b, vec_type c)                                 | Performs a fused multiply-add operation: ``(a * b + c)``            |
+|                                                                                       | (faster than doing it manually)                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **step** (vec_type a, vec_type b)                                            | ``b[i] < a[i] ? 0.0 : 1.0``                                         |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **step** (float a, vec_type b)                                               | ``b[i] < a ? 0.0 : 1.0``                                            |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **smoothstep** (vec_type a, vec_type b, vec_type c)                          | Hermite interpolate between ``a`` and ``b`` by ``c``                |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **smoothstep** (float a, float b, vec_type c)                                | Hermite interpolate between ``a`` and ``b`` by ``c``                |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **isnan** (vec_type x)                                                      | Returns ``true`` if scalar or vector component is ``NaN``           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **isinf** (vec_type x)                                                      | Returns ``true`` if scalar or vector component is ``INF``           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **floatBitsToInt** (vec_type x)                                             | Float->Int bit copying, no conversion                               |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uvec_type **floatBitsToUint** (vec_type x)                                            | Float->UInt bit copying, no conversion                              |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **intBitsToFloat** (ivec_type x)                                             | Int->Float bit copying, no conversion                               |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **uintBitsToFloat** (uvec_type x)                                            | UInt->Float bit copying, no conversion                              |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| float **length** (vec_type x)                                                         | Vector length                                                       |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| float **distance** (vec_type a, vec_type b)                                           | Distance between vectors i.e ``length(a - b)``                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| float **dot** (vec_type a, vec_type b)                                                | Dot product                                                         |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec3 **cross** (vec3 a, vec3 b)                                                       | Cross product                                                       |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **normalize** (vec_type x)                                                   | Normalize to unit length                                            |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec3 **reflect** (vec3 I, vec3 N)                                                     | Reflect                                                             |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec3 **refract** (vec3 I, vec3 N, float eta)                                          | Refract                                                             |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **faceforward** (vec_type N, vec_type I, vec_type Nref)                      | If ``dot(Nref, I)`` < 0, return N, otherwise –N                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| mat_type **matrixCompMult** (mat_type x, mat_type y)                                  | Matrix component multiplication                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| mat_type **outerProduct** (vec_type column, vec_type row)                             | Matrix outer product                                                |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| mat_type **transpose** (mat_type m)                                                   | Transpose matrix                                                    |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| float **determinant** (mat_type m)                                                    | Matrix determinant                                                  |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| mat_type **inverse** (mat_type m)                                                     | Inverse matrix                                                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **lessThan** (vec_type x, vec_type y)                                       | Bool vector comparison on < int/uint/float vectors                  |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **greaterThan** (vec_type x, vec_type y)                                    | Bool vector comparison on > int/uint/float vectors                  |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **lessThanEqual** (vec_type x, vec_type y)                                  | Bool vector comparison on <= int/uint/float vectors                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **greaterThanEqual** (vec_type x, vec_type y)                               | Bool vector comparison on >= int/uint/float vectors                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **equal** (vec_type x, vec_type y)                                          | Bool vector comparison on == int/uint/float vectors                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **notEqual** (vec_type x, vec_type y)                                       | Bool vector comparison on != int/uint/float vectors                 |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bool **any** (bvec_type x)                                                            | ``true`` if any component is ``true``, ``false`` otherwise          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bool **all** (bvec_type x)                                                            | ``true`` if all components are ``true``, ``false`` otherwise        |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| bvec_type **not** (bvec_type x)                                                       | Invert boolean vector                                               |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec2 **textureSize** (sampler2D_type s, int lod)                                     | Get the size of a 2D texture                                        |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec3 **textureSize** (sampler2DArray_type s, int lod)                                | Get the size of a 2D texture array                                  |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec3 **textureSize** (sampler3D s, int lod)                                          | Get the size of a 3D texture                                        |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec2 **textureSize** (samplerCube s, int lod)                                        | Get the size of a cubemap texture                                   |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **texture** (sampler2D_type s, vec2 uv [, float bias])                      | Perform a 2D texture read                                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type  **texture** (sampler2DArray_type s, vec3 uv [, float bias])                | Perform a 2D texture array read                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type  **texture** (sampler3D_type s, vec3 uv [, float bias])                     | Perform a 3D texture read                                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4 **texture** (samplerCube s, vec3 uv [, float bias])                              | Perform a cubemap texture read                                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureProj** (sampler2D_type s, vec3 uv [, float bias])                  | Perform a 2D texture read with projection                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureProj** (sampler2D_type s, vec4 uv [, float bias])                  | Perform a 2D texture read with projection                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type  **textureProj** (sampler3D_type s, vec4 uv [, float bias])                 | Perform a 3D texture read with projection                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureLod** (sampler2D_type s, vec2 uv, float lod)                       | Perform a 2D texture read at custom mipmap                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureLod** (sampler2DArray_type s, vec3 uv, float lod)                  | Perform a 2D texture array read at custom mipmap                    |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureLod** (sampler3D_type s, vec3 uv, float lod)                       | Perform a 3D texture read at custom mipmap                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4 **textureLod** (samplerCube s, vec3 uv, float lod)                               | Perform a 3D texture read at custom mipmap                          |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureProjLod** (sampler2D_type s, vec3 uv, float lod)                   | Perform a 2D texture read with projection/LOD                       |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureProjLod** (sampler2D_type s, vec4 uv, float lod)                   | Perform a 2D texture read with projection/LOD                       |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **textureProjLod** (sampler3D_type s, vec4 uv, float lod)                   | Perform a 3D texture read with projection/LOD                       |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **texelFetch** (sampler2D_type s, ivec2 uv, int lod)                        | Fetch a single texel using integer coordinates                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **texelFetch** (sampler2DArray_type s, ivec3 uv, int lod)                   | Fetch a single texel using integer coordinates                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec4_type **texelFetch** (sampler3D_type s, ivec3 uv, int lod)                        | Fetch a single texel using integer coordinates                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **dFdx** (vec_type p)                                                        | Derivative in ``x`` using local differencing                        |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **dFdy** (vec_type p)                                                        | Derivative in ``y`` using local differencing                        |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| vec_type **fwidth** (vec_type p)                                                      | Sum of absolute derivative in ``x`` and ``y``                       |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uint **packHalf2x16** (vec2 v)                                                        | Convert two 32-bit floating-point numbers into 16-bit               |
+| vec2 **unpackHalf2x16** (uint v)                                                      | and pack them into a 32-bit unsigned integer and vice-versa.        |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uint **packUnorm2x16** (vec2 v)                                                       | Convert two 32-bit floating-point numbers (clamped                  |
+| vec2 **unpackUnorm2x16** (uint v)                                                     | within 0..1 range) into 16-bit and pack them                        |
+|                                                                                       | into a 32-bit unsigned integer and vice-versa.                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uint **packSnorm2x16** (vec2 v)                                                       | Convert two 32-bit floating-point numbers (clamped                  |
+| vec2 **unpackSnorm2x16** (uint v)                                                     | within -1..1 range) into 16-bit and pack them                       |
+|                                                                                       | into a 32-bit unsigned integer and vice-versa.                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uint **packUnorm4x8** (vec4 v)                                                        | Convert four 32-bit floating-point numbers (clamped                 |
+| vec4 **unpackUnorm4x8** (uint v)                                                      | within 0..1 range) into 8-bit and pack them                         |
+|                                                                                       | into a 32-bit unsigned integer and vice-versa.                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uint **packSnorm4x8** (vec4 v)                                                        | Convert four 32-bit floating-point numbers (clamped                 |
+| vec4 **unpackSnorm4x8** (uint v)                                                      | within -1..1 range) into 8-bit and pack them                        |
+|                                                                                       | into a 32-bit unsigned integer and vice-versa.                      |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **bitfieldExtract** (ivec_type value, int offset, int bits)                 | Extracts a range of bits from an integer.                           |
+| uvec_type **bitfieldExtract** (uvec_type value, int offset, int bits)                 |                                                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **bitfieldInsert** (ivec_type base, ivec_type insert, int offset, int bits) | Insert a range of bits into an integer.                             |
+| uvec_type **bitfieldInsert** (uvec_type base, uvec_type insert, int offset, int bits) |                                                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **bitfieldReverse** (ivec_type value)                                       | Reverse the order of bits in an integer.                            |
+| uvec_type **bitfieldReverse** (uvec_type value)                                       |                                                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **bitCount** (ivec_type value)                                              | Counts the number of 1 bits in an integer.                          |
+| uvec_type **bitCount** (uvec_type value)                                              |                                                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **findLSB** (ivec_type value)                                               | Find the index of the least significant bit set to 1 in an integer. |
+| uvec_type **findLSB** (uvec_type value)                                               |                                                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| ivec_type **findMSB** (ivec_type value)                                               | Find the index of the most significant bit set to 1 in an integer.  |
+| uvec_type **findMSB** (uvec_type value)                                               |                                                                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uvec_type **uaddCarry** (uvec_type x, uvec_type y, out uvec_type carry)               | Add unsigned integers and generate carry.                           |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+
+| uvec_type **usubBorrow** (uvec_type x, uvec_type y, out uvec_type borrow)             | Subtract unsigned integers and generate borrow.                     |
++---------------------------------------------------------------------------------------+---------------------------------------------------------------------+