From 42e8bda57c9ddf1d866e782e1d93ef96c7f10b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=A4=A9?= Date: Wed, 10 Jul 2024 12:14:16 +0800 Subject: [PATCH] Clarify `INV_VIEW_MATRIX` and `MAIN_CAM_INV_VIEW_MATRIX` (#9544) --- tutorials/shaders/shader_reference/spatial_shader.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tutorials/shaders/shader_reference/spatial_shader.rst b/tutorials/shaders/shader_reference/spatial_shader.rst index 3430f60f9..1e030dd17 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/tutorials/shaders/shader_reference/spatial_shader.rst @@ -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 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. + Fragment built-ins ^^^^^^^^^^^^^^^^^^