From 6f4f38db07c901a8b7dc74ad871af98030336031 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Tue, 13 Dec 2022 15:13:16 +1100 Subject: Added options for sorting transparent objects (port of PR 63040) --- doc/classes/RenderingServer.xml | 9 +++++++++ doc/classes/VisualInstance3D.xml | 7 +++++++ 2 files changed, 16 insertions(+) (limited to 'doc/classes') 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]. + + + + + + + Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. + + 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. + + 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. + + + 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]. + -- cgit v1.2.3