ソースを参照

Document VERTEX_ID, INSTANCE_ID built-ins for canvas_item vertex shader

kleonc 1 年間 前
コミット
be0806bbc0
1 ファイル変更5 行追加0 行削除
  1. 5 0
      tutorials/shaders/shader_reference/canvas_item_shader.rst

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

@@ -109,6 +109,8 @@ is usually:
 | in mat4 **SCREEN_MATRIX**      | Canvas space to clip space. In clip space          |
 | in mat4 **SCREEN_MATRIX**      | Canvas space to clip space. In clip space          |
 |                                | coordinates ranging from (-1, -1) to (1, 1).       |
 |                                | coordinates ranging from (-1, -1) to (1, 1).       |
 +--------------------------------+----------------------------------------------------+
 +--------------------------------+----------------------------------------------------+
+| in int  **INSTANCE_ID**        | Instance ID for instancing.                        |
++--------------------------------+----------------------------------------------------+
 | in vec4 **INSTANCE_CUSTOM**    | Instance custom data.                              |
 | in vec4 **INSTANCE_CUSTOM**    | Instance custom data.                              |
 +--------------------------------+----------------------------------------------------+
 +--------------------------------+----------------------------------------------------+
 | in bool **AT_LIGHT_PASS**      | Always ``false``.                                  |
 | in bool **AT_LIGHT_PASS**      | Always ``false``.                                  |
@@ -119,6 +121,9 @@ is usually:
 +--------------------------------+----------------------------------------------------+
 +--------------------------------+----------------------------------------------------+
 | inout vec2 **VERTEX**          | Vertex, in local space.                            |
 | inout vec2 **VERTEX**          | Vertex, in local space.                            |
 +--------------------------------+----------------------------------------------------+
 +--------------------------------+----------------------------------------------------+
+| in int **VERTEX_ID**           | The index of the current vertex in the vertex      |
+|                                | buffer.                                            |
++--------------------------------+----------------------------------------------------+
 | inout vec2 **UV**              | Normalized texture coordinates. Range from 0 to 1. |
 | inout vec2 **UV**              | Normalized texture coordinates. Range from 0 to 1. |
 +--------------------------------+----------------------------------------------------+
 +--------------------------------+----------------------------------------------------+
 | inout vec4 **COLOR**           | Color from vertex primitive.                       |
 | inout vec4 **COLOR**           | Color from vertex primitive.                       |