فهرست منبع

Merge pull request #11262 from SDGNelson/patch-1

Add Z_CLIP_SCALE to Spatial Shaders reference vertex built-ins
Nelson Sexton 1 هفته پیش
والد
کامیت
f9730cf63f
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      tutorials/shaders/shader_reference/spatial_shader.rst

+ 7 - 0
tutorials/shaders/shader_reference/spatial_shader.rst

@@ -269,6 +269,13 @@ shader, this value can be used as desired.
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
 | in vec4 **CUSTOM3**                    | Custom value from vertex primitive.                    |
 | in vec4 **CUSTOM3**                    | Custom value from vertex primitive.                    |
 +----------------------------------------+--------------------------------------------------------+
 +----------------------------------------+--------------------------------------------------------+
+| out float **Z_CLIP_SCALE**             | If written to, scales the vertex towards the camera to |
+|                                        | avoid clipping into things like walls.                 |
+|                                        | Lighting and shadows will continue to work correctly   |
+|                                        | when this is written to, but screen-space effects like |
+|                                        | SSAO and SSR may break with lower scales. Try to keep  |
+|                                        | this value as close to ``1.0`` as possible.            |
++----------------------------------------+--------------------------------------------------------+
 
 
 .. note::
 .. note::