Ver Fonte

Added VERTEX_ID, clarified CUSTOM# as inout (#6144)

* Added VERTEX_ID, clarified CUSTOM# as inout

Yeah no of course that's not actually writeable haha. CUSTOM0 etc are `in`, not `out`.
Morgan Harris há 2 anos atrás
pai
commit
75060e93e7
1 ficheiros alterados com 6 adições e 4 exclusões
  1. 6 4
      tutorials/shaders/shader_reference/spatial_shader.rst

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

@@ -185,6 +185,8 @@ shader, this value can be used as desired.
 +----------------------------------------+--------------------------------------------------------+
 | inout vec3 **VERTEX**                  | Vertex in local coordinates.                           |
 +----------------------------------------+--------------------------------------------------------+
+| in int **VERTEX_ID**                   | The index of the current vertex in the vertex buffer.  |
++----------------------------------------+--------------------------------------------------------+
 | inout vec3 **NORMAL**                  | Normal in local coordinates.                           |
 +----------------------------------------+--------------------------------------------------------+
 | inout vec3 **TANGENT**                 | Tangent in local coordinates.                          |
@@ -217,13 +219,13 @@ shader, this value can be used as desired.
 +----------------------------------------+--------------------------------------------------------+
 | inout vec4 **BONE_WEIGHTS**            |                                                        |
 +----------------------------------------+--------------------------------------------------------+
-| out vec4 **CUSTOM0**                   |                                                        |
+| in vec4 **CUSTOM0**                    |                                                        |
 +----------------------------------------+--------------------------------------------------------+
-| out vec4 **CUSTOM1**                   |                                                        |
+| in vec4 **CUSTOM1**                    |                                                        |
 +----------------------------------------+--------------------------------------------------------+
-| out vec4 **CUSTOM2**                   |                                                        |
+| in vec4 **CUSTOM2**                    |                                                        |
 +----------------------------------------+--------------------------------------------------------+
-| out vec4 **CUSTOM3**                   |                                                        |
+| in vec4 **CUSTOM3**                    |                                                        |
 +----------------------------------------+--------------------------------------------------------+
 
 .. note::