소스 검색

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

谢天 1 년 전
부모
커밋
42e8bda57c
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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
 ^^^^^^^^^^^^^^^^^^