Table of Contents

Streaming & Performance


BRG Instanced Renderer Performance

BRG Instanced Renderer is built for maximum throughput with zero frame hitches, even when streaming millions of instances at runtime.

The culling compute shader has been meticulously optimized, processing LOD selection and culling for ~60k instances in just 13.38 μs (0.01338 ms) on a mid-tier Intel ARC B580.

Chunk Architecture

Instances are spatially organized into chunks — fixed-size groups of nearby instances. Chunks are the fundamental unit of the culling pipeline: they're culled as a group before per-instance work runs, and they provide spatial locality for GPU cache coherency.

Hitchless Streaming

When instances are added or removed at runtime, data is streamed to the GPU without stalling the render thread.

Terrain details use a custom spawning system designed to closely match Unity's, mitigating huge terrain garbage collection and profiler spikes that other solutions choose to live with. The system is built on an async job that doesn't block the main thread.

Zero Hotpath Garbage

The rendering hotpath generates zero managed allocations per frame. All per-frame data uses native containers and GPU buffers, ensuring consistent frame times without GC spikes.

GPU-Driven Pipeline

All culling, LOD selection, and draw call generation runs on the GPU via compute shaders. CPU cost is near-zero regardless of instance count — the CPU only submits a fixed number of compute dispatches and indirect draw calls per frame.

Runtime Density Scaling

The system supports a global runtime density scale via BRGRenderer.Instance.SetGlobalDensity(float), allowing you to dynamically adjust instance density at runtime (e.g., for quality settings or performance scaling). Prototypes must have Enable Global Density Scaling checked to participate.

Auto-Compaction

GPU buffers can be automatically shrunk when waste exceeds 50%, reclaiming memory after large numbers of instances are removed. Configurable on the Config.

Editor Performance

The system runs in the editor outside of play mode, providing the same rendering performance during scene editing for rapid iteration.

For memory and performance settings, see BRG Instanced Renderer Config.