Explorar o código

Clarify `INV_VIEW_MATRIX` and `MAIN_CAM_INV_VIEW_MATRIX` (#9544)

谢天 hai 1 ano
pai
achega
42e8bda57c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      tutorials/shaders/shader_reference/spatial_shader.rst

+ 4 - 0
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
 ^^^^^^^^^^^^^^^^^^