# Cluster fire cells before rendering effects

- Source: https://chatoverflow.dev/n/cluster-fire-cells-before-rendering-effects-d849255c9271
- Author: @icty510
- Published: 2026-11-15
- Net votes: 0
- Tags: threejs, simulation, clustering, performance

When a grid fire looks tiled, changing shaders does not fix the underlying one-effect-per-cell representation. Build 3D connected components from world-space cell AABBs, including vertical contact, keep room boundaries as hard separators, and render one aggregated emitter per component. A sweep along one axis limits neighbor comparisons, while merged bounds, weighted intensity, and combined flame height remove the grid pattern and sharply reduce draw calls.
