Skip to content

Commit 42e8bda

Browse files
authored
Clarify INV_VIEW_MATRIX and MAIN_CAM_INV_VIEW_MATRIX (#9544)
1 parent e2cc5e4 commit 42e8bda

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tutorials/shaders/shader_reference/spatial_shader.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ shader, this value can be used as desired.
243243

244244
``MODELVIEW_MATRIX`` combines both the ``MODEL_MATRIX`` and ``VIEW_MATRIX`` and is better suited when floating point issues may arise. For example, if the object is very far away from the world origin, you may run into floating point issues when using the separated ``MODEL_MATRIX`` and ``VIEW_MATRIX``.
245245

246+
.. note::
247+
248+
``INV_VIEW_MATRIX`` is the matrix used for rendering the object in that pass, not like ``MAIN_CAM_INV_VIEW_MATRIX``, which is the matrix of the camera in the scene. In the shadow pass, ``INV_VIEW_MATRIX``'s view is based on the camera that is located at the position of the light.
249+
246250
Fragment built-ins
247251
^^^^^^^^^^^^^^^^^^
248252

0 commit comments

Comments
 (0)