|
159 | 159 | <member name="depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="BaseMaterial3D.DepthDrawMode" default="0"> |
160 | 160 | Determines when depth rendering takes place. See also [member transparency]. |
161 | 161 | </member> |
| 162 | + <member name="depth_test" type="int" setter="set_depth_test" getter="get_depth_test" enum="BaseMaterial3D.DepthTest" default="0" experimental="May be affected by future rendering pipeline changes."> |
| 163 | + Determines which comparison operator is used when testing depth. See [enum DepthTest]. |
| 164 | + [b]Note:[/b] Changing [member depth_test] to a non-default value only has a visible effect when used on a transparent material, or a material that has [member depth_draw_mode] set to [constant DEPTH_DRAW_DISABLED]. |
| 165 | + </member> |
162 | 166 | <member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture"> |
163 | 167 | Texture that specifies the color of the detail overlay. [member detail_albedo]'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see [member detail_mask]. |
164 | 168 | [b]Note:[/b] [member detail_albedo] is [i]not[/i] modulated by [member albedo_color]. |
|
374 | 378 | The method for rendering the specular blob. |
375 | 379 | [b]Note:[/b] [member specular_mode] only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, [VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these sources as well, set [member metallic_specular] to [code]0.0[/code] instead. |
376 | 380 | </member> |
| 381 | + <member name="stencil_color" type="Color" setter="set_stencil_effect_color" getter="get_stencil_effect_color" default="Color(0, 0, 0, 1)" experimental="May be affected by future rendering pipeline changes."> |
| 382 | + The primary color of the stencil effect. |
| 383 | + </member> |
| 384 | + <member name="stencil_compare" type="int" setter="set_stencil_compare" getter="get_stencil_compare" enum="BaseMaterial3D.StencilCompare" default="0" experimental="May be affected by future rendering pipeline changes."> |
| 385 | + The comparison operator to use for stencil masking operations. See [enum StencilCompare]. |
| 386 | + </member> |
| 387 | + <member name="stencil_flags" type="int" setter="set_stencil_flags" getter="get_stencil_flags" default="0" experimental="May be affected by future rendering pipeline changes."> |
| 388 | + The flags dictating how the stencil operation behaves. See [enum StencilFlags]. |
| 389 | + </member> |
| 390 | + <member name="stencil_mode" type="int" setter="set_stencil_mode" getter="get_stencil_mode" enum="BaseMaterial3D.StencilMode" default="0" experimental="May be affected by future rendering pipeline changes."> |
| 391 | + The stencil effect mode. See [enum StencilMode]. |
| 392 | + </member> |
| 393 | + <member name="stencil_outline_thickness" type="float" setter="set_stencil_effect_outline_thickness" getter="get_stencil_effect_outline_thickness" default="0.01" experimental="May be affected by future rendering pipeline changes."> |
| 394 | + The outline thickness for [constant STENCIL_MODE_OUTLINE]. |
| 395 | + </member> |
| 396 | + <member name="stencil_reference" type="int" setter="set_stencil_reference" getter="get_stencil_reference" default="1" experimental="May be affected by future rendering pipeline changes."> |
| 397 | + The stencil reference value (0-255). Typically a power of 2. |
| 398 | + </member> |
377 | 399 | <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> |
378 | 400 | If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality]. |
379 | 401 | </member> |
|
661 | 683 | <constant name="DEPTH_DRAW_DISABLED" value="2" enum="DepthDrawMode"> |
662 | 684 | Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled). |
663 | 685 | </constant> |
| 686 | + <constant name="DEPTH_TEST_DEFAULT" value="0" enum="DepthTest"> |
| 687 | + Depth test will discard the pixel if it is behind other pixels. |
| 688 | + </constant> |
| 689 | + <constant name="DEPTH_TEST_INVERTED" value="1" enum="DepthTest"> |
| 690 | + Depth test will discard the pixel if it is in front of other pixels. Useful for stencil effects. |
| 691 | + </constant> |
664 | 692 | <constant name="CULL_BACK" value="0" enum="CullMode"> |
665 | 693 | Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes, this means that only the exterior of the mesh will be visible. |
666 | 694 | </constant> |
|
818 | 846 | <constant name="DISTANCE_FADE_OBJECT_DITHER" value="3" enum="DistanceFadeMode"> |
819 | 847 | Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA] and [constant DISTANCE_FADE_PIXEL_DITHER]. |
820 | 848 | </constant> |
| 849 | + <constant name="STENCIL_MODE_DISABLED" value="0" enum="StencilMode"> |
| 850 | + Disables stencil operations. |
| 851 | + </constant> |
| 852 | + <constant name="STENCIL_MODE_OUTLINE" value="1" enum="StencilMode"> |
| 853 | + Stencil preset which applies an outline to the object. |
| 854 | + [b]Note:[/b] Requires a [member Material.next_pass] material which will be automatically applied. Any manual changes made to [member Material.next_pass] will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a [member Material.next_pass] material on a material that uses stencil presets, use [member GeometryInstance3D.material_overlay] instead. |
| 855 | + </constant> |
| 856 | + <constant name="STENCIL_MODE_XRAY" value="2" enum="StencilMode"> |
| 857 | + Stencil preset which shows a silhouette of the object behind walls. |
| 858 | + [b]Note:[/b] Requires a [member Material.next_pass] material which will be automatically applied. Any manual changes made to [member Material.next_pass] will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a [member Material.next_pass] material on a material that uses stencil presets, use [member GeometryInstance3D.material_overlay] instead. |
| 859 | + </constant> |
| 860 | + <constant name="STENCIL_MODE_CUSTOM" value="3" enum="StencilMode"> |
| 861 | + Enables stencil operations without a preset. |
| 862 | + </constant> |
| 863 | + <constant name="STENCIL_FLAG_READ" value="1" enum="StencilFlags"> |
| 864 | + The material will only be rendered where it passes a stencil comparison with existing stencil buffer values. See [enum StencilCompare]. |
| 865 | + </constant> |
| 866 | + <constant name="STENCIL_FLAG_WRITE" value="2" enum="StencilFlags"> |
| 867 | + The material will write the reference value to the stencil buffer where it passes the depth test. |
| 868 | + </constant> |
| 869 | + <constant name="STENCIL_FLAG_WRITE_DEPTH_FAIL" value="4" enum="StencilFlags"> |
| 870 | + The material will write the reference value to the stencil buffer where it fails the depth test. |
| 871 | + </constant> |
| 872 | + <constant name="STENCIL_COMPARE_ALWAYS" value="0" enum="StencilCompare"> |
| 873 | + Always passes the stencil test. |
| 874 | + </constant> |
| 875 | + <constant name="STENCIL_COMPARE_LESS" value="1" enum="StencilCompare"> |
| 876 | + Passes the stencil test when the reference value is less than the existing stencil value. |
| 877 | + </constant> |
| 878 | + <constant name="STENCIL_COMPARE_EQUAL" value="2" enum="StencilCompare"> |
| 879 | + Passes the stencil test when the reference value is equal to the existing stencil value. |
| 880 | + </constant> |
| 881 | + <constant name="STENCIL_COMPARE_LESS_OR_EQUAL" value="3" enum="StencilCompare"> |
| 882 | + Passes the stencil test when the reference value is less than or equal to the existing stencil value. |
| 883 | + </constant> |
| 884 | + <constant name="STENCIL_COMPARE_GREATER" value="4" enum="StencilCompare"> |
| 885 | + Passes the stencil test when the reference value is greater than the existing stencil value. |
| 886 | + </constant> |
| 887 | + <constant name="STENCIL_COMPARE_NOT_EQUAL" value="5" enum="StencilCompare"> |
| 888 | + Passes the stencil test when the reference value is not equal to the existing stencil value. |
| 889 | + </constant> |
| 890 | + <constant name="STENCIL_COMPARE_GREATER_OR_EQUAL" value="6" enum="StencilCompare"> |
| 891 | + Passes the stencil test when the reference value is greater than or equal to the existing stencil value. |
| 892 | + </constant> |
821 | 893 | </constants> |
822 | 894 | </class> |
0 commit comments