File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
tutorials/shaders/shader_reference Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,8 @@ SDF functions
335
335
336
336
There are a few additional functions implemented to sample an automatically
337
337
generated Signed Distance Field texture. These functions available for the ``fragment() ``
338
- and ``light() `` functions of CanvasItem shaders.
338
+ and ``light() `` functions of CanvasItem shaders. Custom functions may also use them as long
339
+ as they called from supported functions.
339
340
340
341
The signed distance field is generated from :ref: `class_LightOccluder2D ` nodes
341
342
present in the scene with the **SDF Collision ** property enabled (which is the
Original file line number Diff line number Diff line change @@ -597,8 +597,8 @@ information.
597
597
Discarding
598
598
----------
599
599
600
- Fragment and light functions can use the `` discard `` keyword. If used, the
601
- fragment is discarded and nothing is written.
600
+ Fragment, light and custom functions (called from fragment or light) can use the
601
+ `` discard `` keyword. If used, the fragment is discarded and nothing is written.
602
602
603
603
Beware that ``discard `` has a performance cost when used, as it will prevent the
604
604
depth prepass from being effective on any surfaces using the shader. Also, a
You can’t perform that action at this time.
0 commit comments