Skip to content

Commit

Permalink
Mention that user is responsible for POSITION value when it's written…
Browse files Browse the repository at this point in the history
… to anywhere in the shader
  • Loading branch information
jsjtxietian committed May 10, 2024
1 parent 183d0e3 commit a15e99c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tutorials/shaders/shader_reference/spatial_shader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ it manually with the following code:
Other built-ins, such as UV, UV2 and COLOR, are also passed through to the fragment function if not modified.

Users can override the modelview and projection transforms using the ``POSITION`` built-in. When ``POSITION`` is used,
the value from ``VERTEX`` is ignored and projection does not happen. However, the value passed to the fragment shader
still comes from ``VERTEX``.
Users can override the modelview and projection transforms using the ``POSITION`` built-in. if ``POSITION`` is written
to anywhere in the shader, it will always be used, so the user becomes responsible for ensuring that it always has
acceptable values. When ``POSITION`` is used, the value from ``VERTEX`` is ignored and projection does not happen.
However, the value passed to the fragment shader still comes from ``VERTEX``.

For instancing, the INSTANCE_CUSTOM variable contains the instance custom data. When using particles, this information
is usually:
Expand Down

0 comments on commit a15e99c

Please sign in to comment.