diff --git a/tutorials/shaders/shader_reference/canvas_item_shader.rst b/tutorials/shaders/shader_reference/canvas_item_shader.rst index 8c5819169..ae4ebb0db 100644 --- a/tutorials/shaders/shader_reference/canvas_item_shader.rst +++ b/tutorials/shaders/shader_reference/canvas_item_shader.rst @@ -335,7 +335,8 @@ SDF functions There are a few additional functions implemented to sample an automatically generated Signed Distance Field texture. These functions available for the ``fragment()`` -and ``light()`` functions of CanvasItem shaders. +and ``light()`` functions of CanvasItem shaders. Custom functions may also use them as long +as they called from supported functions. The signed distance field is generated from :ref:`class_LightOccluder2D` nodes present in the scene with the **SDF Collision** property enabled (which is the diff --git a/tutorials/shaders/shader_reference/shading_language.rst b/tutorials/shaders/shader_reference/shading_language.rst index bfcc6eece..793bb06fd 100644 --- a/tutorials/shaders/shader_reference/shading_language.rst +++ b/tutorials/shaders/shader_reference/shading_language.rst @@ -597,8 +597,8 @@ information. Discarding ---------- -Fragment and light functions can use the ``discard`` keyword. If used, the -fragment is discarded and nothing is written. +Fragment, light, and custom functions (called from fragment or light) can use the +``discard`` keyword. If used, the fragment is discarded and nothing is written. Beware that ``discard`` has a performance cost when used, as it will prevent the depth prepass from being effective on any surfaces using the shader. Also, a