@@ -35,6 +35,10 @@ For visual examples of these render modes, see :ref:`Standard Material 3D and OR
35
35
+-------------------------------+------------------------------------------------------------------------------------------------------+
36
36
| **depth_test_disabled ** | Disable depth testing. |
37
37
+-------------------------------+------------------------------------------------------------------------------------------------------+
38
+ | **depth_test_default ** | Depth test will discard the pixel if it is behind other pixels. |
39
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
40
+ | **depth_test_inverted ** | Depth test will discard the pixel if it is in front of other pixels. Useful for stencil effects |
41
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
38
42
| **sss_mode_skin ** | Subsurface Scattering mode for skin (optimizes visuals for human skin, e.g. boosted red channel). |
39
43
+-------------------------------+------------------------------------------------------------------------------------------------------+
40
44
| **cull_back ** | Cull back-faces (default). |
@@ -90,6 +94,44 @@ For visual examples of these render modes, see :ref:`Standard Material 3D and OR
90
94
| **fog_disabled ** | Disable receiving depth-based or volumetric fog. Useful for ``blend_add `` materials like particles. |
91
95
+-------------------------------+------------------------------------------------------------------------------------------------------+
92
96
97
+ Stencil modes
98
+ ------------
99
+ Stencil operations are a set of operations that allow to write into an efficient, often hardeware integrated, buffer.
100
+ Stencil is generally use to mask in or out parts of the scene.
101
+
102
+ NOTE: Stencil support is experimental, use at your own risk. We will try to not break compatibility as much as possible, but if major flaws
103
+ are found in the API, it may change in the next version.
104
+
105
+ Some of the most known uses are:
106
+ - Outlines: stencil allows to mask out the inner mesh that is being outlined to avoid inner outlines.
107
+ - Xray: display a mesh behind other objects.
108
+ - Portals: Draw impossible geometry by masking objects
109
+
110
+ NOTE: You can only read stencil in the transparent pass. Any attempt to read in the opaque pass will fail and it's not supported behaviour.
111
+ NOTE: Stencil operations aren't yet supported in compositor effects. Please use full screen quad method.
112
+
113
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
114
+ | Stencil mode | Description |
115
+ +===============================+======================================================================================================+
116
+ | **read ** | Read from stencil buffer. |
117
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
118
+ | **write ** | Write reference value to stencil buffer. |
119
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
120
+ | **write_if_depth_fail ** | Write reference value to stencil buffer if depth test fails. |
121
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
122
+ | **compare_equal ** | Pass stencil test if ref value is equal to stencil buffer value. |
123
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
124
+ | **compare_not_equal ** | Pass stencil test if ref value is not equal to stencil buffer value. |
125
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
126
+ | **compare_less ** | Pass stencil test if ref value is lesser than stencil buffer value. |
127
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
128
+ | **compare_less_or_equal ** | Pass stencil test if ref value is lesser or equal than stencil buffer value. |
129
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
130
+ | **compare_greater ** | Pass stencil test if ref value is greater than stencil buffer value. |
131
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
132
+ | **compare_greater_or_equal ** | Pass stencil test if ref value is lesser or equal than stencil buffer value. |
133
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
134
+
93
135
Built-ins
94
136
---------
95
137
0 commit comments