You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Add depth function for spatial materials
This commit is contained in:
@@ -159,6 +159,10 @@
|
||||
<member name="depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="BaseMaterial3D.DepthDrawMode" default="0">
|
||||
Determines when depth rendering takes place. See also [member transparency].
|
||||
</member>
|
||||
<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.">
|
||||
Determines which comparison operator is used when testing depth. See [enum DepthTest].
|
||||
[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].
|
||||
</member>
|
||||
<member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture">
|
||||
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].
|
||||
[b]Note:[/b] [member detail_albedo] is [i]not[/i] modulated by [member albedo_color].
|
||||
@@ -661,6 +665,12 @@
|
||||
<constant name="DEPTH_DRAW_DISABLED" value="2" enum="DepthDrawMode">
|
||||
Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled).
|
||||
</constant>
|
||||
<constant name="DEPTH_TEST_DEFAULT" value="0" enum="DepthTest">
|
||||
Depth test will discard the pixel if it is behind other pixels.
|
||||
</constant>
|
||||
<constant name="DEPTH_TEST_INVERTED" value="1" enum="DepthTest">
|
||||
Depth test will discard the pixel if it is in front of other pixels. Useful for stencil effects.
|
||||
</constant>
|
||||
<constant name="CULL_BACK" value="0" enum="CullMode">
|
||||
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.
|
||||
</constant>
|
||||
|
||||
Reference in New Issue
Block a user