diff options
author | Bastiaan Olij <mux213@gmail.com> | 2022-12-13 15:13:16 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2022-12-23 19:30:33 +1100 |
commit | 6f4f38db07c901a8b7dc74ad871af98030336031 (patch) | |
tree | 6d2730e2b086545fa0ca178e20363553756fc6b4 /doc/classes | |
parent | db6976eed4c59b3a320cb26938898c732ef6b7ca (diff) |
Added options for sorting transparent objects (port of PR 63040)
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/RenderingServer.xml | 9 | ||||
-rw-r--r-- | doc/classes/VisualInstance3D.xml | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 7a9a380032..6536f8cb68 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1585,6 +1585,15 @@ Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers]. </description> </method> + <method name="instance_set_pivot_data"> + <return type="void" /> + <param index="0" name="instance" type="RID" /> + <param index="1" name="sorting_offset" type="float" /> + <param index="2" name="use_aabb_center" type="bool" /> + <description> + Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. + </description> + </method> <method name="instance_set_scenario"> <return type="void" /> <param index="0" name="instance" type="RID" /> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 31811f817b..e069642e50 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -61,5 +61,12 @@ This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal. </member> + <member name="sorting_offset" type="float" setter="set_sorting_offset" getter="get_sorting_offset" default="0.0"> + The sorting offset used by this [VisualInstance3D]. Adjusting it to a higher value will make the [VisualInstance3D] reliably draw on top of other [VisualInstance3D]s that are otherwise positioned at the same spot. + </member> + <member name="sorting_use_aabb_center" type="bool" setter="set_sorting_use_aabb_center" getter="is_sorting_use_aabb_center" default="true"> + If [code]true[/code], the object is sorted based on the [AABB] center. The object will be sorted based on the global position otherwise. + The [AABB] center based sorting is generally more accurate for 3D models. The position based sorting instead allows to better control the drawing order when working with [GPUParticles3D] and [CPUParticles3D]. + </member> </members> </class> |