Instance Batcher

$59
Publisher Marko Tatic
File size 1.92MB
Number of files 53
Latest version 1
Latest release date 2016-07-13 05:41:26
First release date 2015-11-16 07:39:19
Supported Unity versions 2018.4.2 or higher
Instance Batcher is a mesh batching solution that will help you reduce draw
calls when using large number of
prefab instances.

Documentation

Please visit the Forum if you have any questions.

========== Features ==========

Requires almost no change in workflow.

Reduces draw calls by batching larger number of instances of a single mesh, while still allowing dynamic use of individual instances.

No vertex limit on the original mesh
(vertex limit of 65534 vertices per Mesh still applies)

Allows dynamic changes to:
- Transform component
- MeshRenderer component properties:
   - shadow casting mode
   - receive shadow
   - material
   - shared material

Allows setting per instance color (RGBA).

Dynamic renderer bounds calculation for each batch (render only visible batches).

Changes are applied in LateUpdate.

Modified Standard shaders:
- Metallic and Specular workflow
- Forward and Deferred render path
- Directional, Point and Spot lights
   (with shadows and cookies)
- using per instance color

Easy to use InstanceBatcher_Utils.cginc for adding instancing support to custom shaders:
- Includes basic instructions
- Simple custom shader provided as a    sample

Editor Tool for generating Instance Batcher Prefab.

Source code included.

=== Requirements and Limitations ===

Target device must have support for:
- Shader Model 3.0
- TextureFormat.RGBAFloat

InstanceBatcher_Utils.cginc works only with vertex/fragment shaders.

Does not support per instance culling.

Does not support multiple materials or sub-meshes on a game object with InstanceController component attached.

Does not work with light probes and/or reflection probes.

Does not support SkinnedMeshRenderer

Does not support LOD Group

Modified Standard shaders do not support parallax.

Things that will make instance not batch with others and will create a new batch:

- Each combination of MeshRenderer's    shadow casting mode and receive shadow    will create a separate batch.

- MeshRenderer's material property behaves    as normal and will produce a new    material, which means that it won't batch    with other instances.

- Adding new instance when the capacity of    the largest batch is reached will produce a    new batch of smallest capacity.

Top Publisher Assets