Skip to content

ECS and SRP Batcher

DOTS Instancing Support (Entities Graphics)

Section titled “DOTS Instancing Support (Entities Graphics)”

The asset includes support for Unity’s Entity Component System (ECS) through DOTS Instancing, in a dedicated shader, AllIn1Vfx/AllIn1VfxDOTS, allowing you to use All In 1 VFX Toolkit materials with Entities Graphics.

  1. Make sure the Entities Graphics package is installed in your project and that you are using URP or HDRP.
  2. Select AllIn1Vfx/AllIn1VfxDOTS in the Material’s Shader dropdown, then configure your VFX Toolkit material as you normally would through the material inspector, enabling the effects and properties you need. The inspector keeps a material on this shader once it’s there.
  3. Assign the material to your entity’s rendering component. Only the DOTS shader carries DOTS Instancing, the other VFX Toolkit shaders aren’t compatible with Entities Graphics.

The DOTS instancing support is implemented through a dedicated shader and an accompanying shader library. These files are located at:

  • Assets/Plugins/AllIn1Assets/AllIn1VfxToolkit/Shaders/AllIn1VfxDOTS.shader
  • Assets/Plugins/AllIn1Assets/AllIn1VfxToolkit/Shaders/ShaderLibrary/AllIn1VfxSRPBatch_*.hlsl

These files are included with the asset and require no manual modification.


SRP Batcher support lives in its own shader too. Select AllIn1Vfx/AllIn1VfxSRPBatch in the Material’s Shader dropdown (the AllIn1Vfx/AllIn1VfxDOTS shader is compatible as well). The default URP and HDRP shaders aren’t. On that shader the SRP Batcher groups materials that share the same shader variant into efficient batches, so you can have many different materials with different property values and still benefit from reduced draw calls, as long as they use the same combination of enabled effects.

To verify that SRP Batching is active on your materials, open the Frame Debugger (Window → Analysis → Frame Debugger) and look for draw calls marked as “SRP Batch” in the draw call list.