From 765da0a365b63cef3e3459467e14e5206d7164e4 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Tue, 22 Aug 2023 08:22:38 +0200 Subject: [PATCH] Document mouse-picking limit of 64 objects --- doc/classes/Viewport.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 101717966ecc..43640916f442 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -298,10 +298,12 @@ If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. + [b]Note:[/b] The number of simultaneously pickable objects is limited to 64 and they are selected in a non-deterministic order, which can be different in each picking process. If [code]true[/code], objects receive mouse picking events sorted primarily by their [member CanvasItem.z_index] and secondarily by their position in the scene tree. If [code]false[/code], the order is undetermined. [b]Note:[/b] This setting is disabled by default because of its potential expensive computational cost. + [b]Note:[/b] Sorting happens after selecting the pickable objects. Because of the limitation of 64 simultaneously pickable objects, it is not guaranteed that the object with the highest [member CanvasItem.z_index] receives the picking event. Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices.