Browse Source

Link to transparency sorting limitations page in Spatial shaders (#5741)

Co-authored-by: Clay John <[email protected]>
Hugo Locurcio 3 years ago
parent
commit
78d319feec

+ 2 - 0
tutorials/3d/3d_rendering_limitations.rst

@@ -76,6 +76,8 @@ Depending on the scene and viewing conditions, you may also be able to move the
 Z-fighting objects further apart without the difference being visible to the
 Z-fighting objects further apart without the difference being visible to the
 player.
 player.
 
 
+.. _doc_3d_rendering_limitations_transparency_sorting:
+
 Transparency sorting
 Transparency sorting
 --------------------
 --------------------
 
 

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

@@ -274,6 +274,13 @@ these properties, and if you don't write to them, Godot will optimize away the c
 | in vec2 **POINT_COORD**           | Point Coordinate for drawing points with POINT_SIZE.                                             |
 | in vec2 **POINT_COORD**           | Point Coordinate for drawing points with POINT_SIZE.                                             |
 +-----------------------------------+--------------------------------------------------------------------------------------------------+
 +-----------------------------------+--------------------------------------------------------------------------------------------------+
 
 
+.. note::
+
+    Shaders going through the transparent pipeline when ``ALPHA`` is written to
+    may exhibit transparency sorting issues. Read the
+    :ref:`transparency sorting section in the 3D rendering limitations page <doc_3d_rendering_limitations_transparency_sorting>`
+    for more information and ways to avoid issues.
+
 Light built-ins
 Light built-ins
 ^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^
 
 
@@ -357,3 +364,10 @@ If you want the lights to add together, add the light contribution to ``DIFFUSE_
 +-----------------------------------+-----------------------------------------------------+
 +-----------------------------------+-----------------------------------------------------+
 | out vec3 **SPECULAR_LIGHT**       | Specular light result.                              |
 | out vec3 **SPECULAR_LIGHT**       | Specular light result.                              |
 +-----------------------------------+-----------------------------------------------------+
 +-----------------------------------+-----------------------------------------------------+
+
+.. note::
+
+    Shaders going through the transparent pipeline when ``ALPHA`` is written to
+    may exhibit transparency sorting issues. Read the
+    :ref:`transparency sorting section in the 3D rendering limitations page <doc_3d_rendering_limitations_transparency_sorting>`
+    for more information and ways to avoid issues.