|
@@ -17,57 +17,69 @@ Data types
|
|
|
|
|
|
Most GLSL ES 3.0 datatypes are supported:
|
|
|
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| Type | Description |
|
|
|
-+=================+===========================================================================+
|
|
|
-| **void** | Void datatype, useful only for functions that return nothing. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **bool** | Boolean datatype, can only contain "true" or "false" |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **bvec2** | Two-component vector of booleans. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **bvec3** | Three-component vector of booleans. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **bvec4** | Four-component vector of booleans. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **int** | Signed scalar integer. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **ivec2** | Two-component vector of signed integers. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **ivec3** | Three-component vector of signed integers. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **ivec4** | Four-component vector of signed integers. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **uint** | Unsigned scalar integer; can't contain negative numbers. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **uvec2** | Two-component vector of unsigned integers. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **uvec3** | Three-component vector of unsigned integers. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **uvec4** | Four-component vector of unsigned integers. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **float** | Floating point scalar. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **vec2** | Two-component vector of floating point values. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **vec3** | Three-component vector of floating point values. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **vec4** | Four-component vector of floating point values. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **mat2** | 2x2 matrix, in column major order. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **mat3** | 3x3 matrix, in column major order. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **mat4** | 4x4 matrix, in column major order. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **sampler2D** | Sampler type for binding 2D textures, which are read as float. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **isampler2D** | Sampler type for binding 2D textures, which are read as signed integer. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **usampler2D** | Sampler type for binding 2D textures, which are read as unsigned integer. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
-| **samplerCube** | Sampler type for binding Cubemaps, which are read as floats. |
|
|
|
-+-----------------+---------------------------------------------------------------------------+
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| Type | Description |
|
|
|
++=====================+=================================================================================+
|
|
|
+| **void** | Void datatype, useful only for functions that return nothing. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **bool** | Boolean datatype, can only contain "true" or "false". |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **bvec2** | Two-component vector of booleans. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **bvec3** | Three-component vector of booleans. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **bvec4** | Four-component vector of booleans. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **int** | Signed scalar integer. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **ivec2** | Two-component vector of signed integers. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **ivec3** | Three-component vector of signed integers. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **ivec4** | Four-component vector of signed integers. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **uint** | Unsigned scalar integer; can't contain negative numbers. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **uvec2** | Two-component vector of unsigned integers. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **uvec3** | Three-component vector of unsigned integers. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **uvec4** | Four-component vector of unsigned integers. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **float** | Floating point scalar. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **vec2** | Two-component vector of floating point values. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **vec3** | Three-component vector of floating point values. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **vec4** | Four-component vector of floating point values. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **mat2** | 2x2 matrix, in column major order. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **mat3** | 3x3 matrix, in column major order. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **mat4** | 4x4 matrix, in column major order. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **sampler2D** | Sampler type for binding 2D textures, which are read as float. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **isampler2D** | Sampler type for binding 2D textures, which are read as signed integer. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **usampler2D** | Sampler type for binding 2D textures, which are read as unsigned integer. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **sampler2DArray** | Sampler type for binding 2D texture arrays, which are read as float. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **isampler2DArray** | Sampler type for binding 2D texture arrays, which are read as signed integer. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **usampler2DArray** | Sampler type for binding 2D texture arrays, which are read as unsigned integer. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **sampler3D** | Sampler type for binding 3D textures, which are read as float. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **isampler3D** | Sampler type for binding 3D textures, which are read as signed integer. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **usampler3D** | Sampler type for binding 3D textures, which are read as unsigned integer. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
+| **samplerCube** | Sampler type for binding Cubemaps, which are read as floats. |
|
|
|
++---------------------+---------------------------------------------------------------------------------+
|
|
|
|
|
|
Casting
|
|
|
~~~~~~~
|