mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Mention that user is responsible for POSITION value when it's written to anywhere in the shader
(cherry picked from commit f6ddd71040)
This commit is contained in:
committed by
Max Hilbrunner
parent
1d281f3c14
commit
b2599b7b86
@@ -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
|
||||
an acceptable value. 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:
|
||||
|
||||
Reference in New Issue
Block a user