@@ -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,47 @@ 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
+
100
+ .. note ::
101
+ Stencil support is experimental, use at your own risk.
102
+ We will try to not break compatibility as much as possible, but if major flaws are found in the API, it may change in the next version.
103
+
104
+
105
+ Stencil operations are a set of operations that allow to write into an efficient, often hardeware integrated, buffer.
106
+ Stencil is generally use to mask in or out parts of the scene.
107
+
108
+ Some of the most known uses are:
109
+ - Outlines: stencil allows to mask out the inner mesh that is being outlined to avoid inner outlines.
110
+ - Xray: display a mesh behind other objects.
111
+ - Portals: Draw impossible geometry by masking objects
112
+
113
+ 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.
114
+ NOTE: Stencil operations aren't yet supported in compositor effects. Please use full screen quad method.
115
+
116
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
117
+ | Stencil mode | Description |
118
+ +===============================+======================================================================================================+
119
+ | **read ** | Read from stencil buffer. |
120
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
121
+ | **write ** | Write reference value to stencil buffer. |
122
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
123
+ | **write_if_depth_fail ** | Write reference value to stencil buffer if depth test fails. |
124
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
125
+ | **compare_equal ** | Pass stencil test if ref value is equal to stencil buffer value. |
126
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
127
+ | **compare_not_equal ** | Pass stencil test if ref value is not equal to stencil buffer value. |
128
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
129
+ | **compare_less ** | Pass stencil test if ref value is lesser than stencil buffer value. |
130
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
131
+ | **compare_less_or_equal ** | Pass stencil test if ref value is lesser or equal than stencil buffer value. |
132
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
133
+ | **compare_greater ** | Pass stencil test if ref value is greater than stencil buffer value. |
134
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
135
+ | **compare_greater_or_equal ** | Pass stencil test if ref value is lesser or equal than stencil buffer value. |
136
+ +-------------------------------+------------------------------------------------------------------------------------------------------+
137
+
93
138
Built-ins
94
139
---------
95
140
0 commit comments