Skip to content

Commit

Permalink
Clarify INV_VIEW_MATRIX and MAIN_CAM_INV_VIEW_MATRIX
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjtxietian committed Jun 27, 2024
1 parent 6df2f22 commit 2cf18d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tutorials/shaders/shader_reference/spatial_shader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ shader, this value can be used as desired.

``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``.

.. note::

``INV_VIEW_MATRIX`` is the matrix used for rendering the object at that pass, not like ``MAIN_CAM_INV_VIEW_MATRIX``, which is the matrix from the camera in the scene. In shadow pass, ``INV_VIEW_MATRIX ``'s view is based on the camera that located at the position of the light.
Fragment built-ins
^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 2cf18d8

Please sign in to comment.