Skip to content

Commit f6ddd71

Browse files
committed
Mention that user is responsible for POSITION value when it's written to anywhere in the shader
1 parent 183d0e3 commit f6ddd71

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tutorials/shaders/shader_reference/spatial_shader.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,10 @@ it manually with the following code:
136136
137137
Other built-ins, such as UV, UV2 and COLOR, are also passed through to the fragment function if not modified.
138138

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

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

0 commit comments

Comments
 (0)