Skip to content

Commit 146182c

Browse files
committed
Clarify the behavior of MeshInstance3D automatic instancing
1 parent 0b174c6 commit 146182c

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

contributing/development/core_and_modules/internal_rendering_architecture.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,10 @@ used to calculate particle collisions in 2D.
456456
Batching and instancing
457457
~~~~~~~~~~~~~~~~~~~~~~~
458458

459-
In the Forward+ renderer, Vulkan instancing is used to group rendering
460-
of identical objects for performance. This is not as fast as static mesh
461-
merging, but it still allows instances to be culled individually.
459+
In the Forward+ renderer, Vulkan instancing is used to group rendering of
460+
identical opaque or alpha-tested objects for performance. (Alpha-blended objects
461+
are never instanced.) This is not as fast as static mesh merging, but it still
462+
allows instances to be culled individually.
462463

463464
Light, decal and reflection probe rendering
464465
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tutorials/performance/optimizing_3d_performance.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,22 @@ the viewer a considerable distance for the angle of view to change
104104
significantly. This can be complex to get working, but may be worth it depending
105105
on the type of project you are making.
106106

107-
Use instancing (MultiMesh)
108-
~~~~~~~~~~~~~~~~~~~~~~~~~~
107+
Use automatic instancing
108+
~~~~~~~~~~~~~~~~~~~~~~~~
109+
110+
*This is only implemented in the Forward+ renderer, not Mobile or Compatibility.*
111+
112+
If you have many identical objects in your scene, you can use automatic
113+
instancing to reduce the number of draw calls. This automatically happens for
114+
MeshInstance3D nodes that use the same mesh and material: no manual setup is required.
115+
116+
For automatic instancing to be effective, the material must be opaque or
117+
alpha-tested (alpha scissor or alpha hash). Alpha-blended or depth pre-pass
118+
materials are never instanced this way. Instead, you must use MultiMesh as
119+
described below.
120+
121+
Use manual instancing (MultiMesh)
122+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109123

110124
If several identical objects have to be drawn in the same place or nearby, try
111125
using :ref:`MultiMesh <class_MultiMesh>` instead. MultiMesh allows the drawing

0 commit comments

Comments
 (0)