Parcourir la source

Merge pull request #9506 from Chaosus/fix_shader_builtins

Fix some incorrect entries in shader built-ins
Yuri Rubinsky il y a 1 an
Parent
commit
7ee31c98f7

+ 4 - 0
tutorials/shaders/shader_reference/canvas_item_shader.rst

@@ -132,6 +132,10 @@ is usually:
 +--------------------------------+----------------------------------------------------+
 | inout float **POINT_SIZE**     | Point size for point drawing.                      |
 +--------------------------------+----------------------------------------------------+
+| in vec4 **CUSTOM0**            |                                                    |
++--------------------------------+----------------------------------------------------+
+| in vec4 **CUSTOM1**            |                                                    |
++--------------------------------+----------------------------------------------------+
 
 Fragment built-ins
 ^^^^^^^^^^^^^^^^^^

+ 6 - 4
tutorials/shaders/shader_reference/spatial_shader.rst

@@ -220,15 +220,15 @@ shader, this value can be used as desired.
 +----------------------------------------+--------------------------------------------------------+
 | inout mat3 **MODELVIEW_NORMAL_MATRIX** |                                                        |
 +----------------------------------------+--------------------------------------------------------+
-| inout mat4 **MODEL_MATRIX**            | Model space to world space transform.                  |
+| in mat4 **MODEL_MATRIX**               | Model space to world space transform.                  |
 +----------------------------------------+--------------------------------------------------------+
-| inout mat3 **MODEL_NORMAL_MATRIX**     |                                                        |
+| in mat3 **MODEL_NORMAL_MATRIX**        |                                                        |
 +----------------------------------------+--------------------------------------------------------+
 | inout mat4 **PROJECTION_MATRIX**       | View space to clip space transform.                    |
 +----------------------------------------+--------------------------------------------------------+
-| inout uvec4 **BONE_INDICES**           |                                                        |
+| in uvec4 **BONE_INDICES**              |                                                        |
 +----------------------------------------+--------------------------------------------------------+
-| inout vec4 **BONE_WEIGHTS**            |                                                        |
+| in vec4 **BONE_WEIGHTS**               |                                                        |
 +----------------------------------------+--------------------------------------------------------+
 | in vec4 **CUSTOM0**                    |                                                        |
 +----------------------------------------+--------------------------------------------------------+
@@ -294,6 +294,8 @@ these properties, and if you don't write to them, Godot will optimize away the c
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 | in vec3 **CAMERA_DIRECTION_WORLD**     | Camera direction, in world space.                                                                |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
+| in int **CAMERA_VISIBLE_LAYERS**       | Cull layers of the camera rendering the current pass.                                            |
++----------------------------------------+--------------------------------------------------------------------------------------------------+
 | in vec3 **VERTEX**                     | Vertex that comes from vertex function (default, in view space).                                 |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 | inout vec3 **LIGHT_VERTEX**            | A writable version of ``VERTEX`` that can be used to alter light and shadows. Writing to this    |