소스 검색

Clarify when fragcoord z is used as depth output

Flarkk 9 달 전
부모
커밋
7c78f294be
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      tutorials/shaders/shader_reference/spatial_shader.rst

+ 3 - 2
tutorials/shaders/shader_reference/spatial_shader.rst

@@ -272,8 +272,9 @@ these properties, and if you don't write to them, Godot will optimize away the c
 +========================================+==================================================================================================+
 | in vec2 **VIEWPORT_SIZE**              | Size of viewport (in pixels).                                                                    |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
-| in vec4 **FRAGCOORD**                  | Coordinate of pixel center in screen space. ``xy`` specifies position in window, ``z``           |
-|                                        | specifies fragment depth if ``DEPTH`` is not used. Origin is lower-left.                         |
+| in vec4 **FRAGCOORD**                  | Coordinate of pixel center in screen space. ``xy`` specifies position in window. Origin is lower |
+|                                        | left. ``z`` specifies fragment depth. It is also used as the output value for the fragment depth |
+|                                        | unless ``DEPTH`` is written to.                                                                  |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+
 | in bool **FRONT_FACING**               | ``true`` if current face is front facing.                                                        |
 +----------------------------------------+--------------------------------------------------------------------------------------------------+