From f1c0ab12ebea2ef737a49e08984cf331c86e9a69 Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Sun, 14 Aug 2022 09:25:07 +0300 Subject: [PATCH] Add `samplerCubeArray` type to the list of supported shader types. --- .../shader_reference/shading_language.rst | 128 +++++++++--------- 1 file changed, 65 insertions(+), 63 deletions(-) diff --git a/tutorials/shaders/shader_reference/shading_language.rst b/tutorials/shaders/shader_reference/shading_language.rst index 9c27d1918..c01cf054e 100644 --- a/tutorials/shaders/shader_reference/shading_language.rst +++ b/tutorials/shaders/shader_reference/shading_language.rst @@ -19,69 +19,71 @@ 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. | -+---------------------+---------------------------------------------------------------------------------+ -| **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. | -+---------------------+---------------------------------------------------------------------------------+ ++----------------------+---------------------------------------------------------------------------------+ +| 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 float. | ++----------------------+---------------------------------------------------------------------------------+ +| **samplerCubeArray** | Sampler type for binding Cubemap arrays, which are read as float. | ++----------------------+---------------------------------------------------------------------------------+ Casting ~~~~~~~