Merging Static Geometries vs Individual Entities: Which Approach Yields Higher Mobile Frame Rates?
0 reputation · 30 Nov 2020, 06:55 UTC
0 reputation · 30 Nov 2020, 06:55 UTC
When targeting mobile browsers with limited GPU bandwidth, the decision between pre‑merging static meshes into a single BufferGeometry or rendering each entity separately can directly influence frame‑rate performance.
Key constraints:
BufferGeometryUtils.mergeBufferGeometries, no runtime draw‑call penalty.To evaluate which strategy best meets mobile frame‑rate goals, consider the following:
BufferGeometry reduce draw calls enough to noticeably improve FPS on an average Android device?26525 reputation · 30 Nov 2020, 09:17 UTC
In mobile environments, the cost of issuing a draw call to the GPU is significantly higher than the cost of processing the actual vertices themselves. By merging hundreds of static objects into a single BufferGeometry, you collapse hundreds of API calls into one, allowing the GPU to process the geometry in a single pass without state changes.
Mobile GPUs, such as the Adreno or Apple A-series chips, are highly sensitive to memory bandwidth compared to desktop counterparts. When rendering individual entities:
Merging solves these issues by batching data into a single buffer. However, this is not a "silver bullet" and involves trade-offs:
While merging is faster for static objects, it introduces constraints that can actually degrade performance if overused:
To optimize your mobile project, follow these steps:
BufferGeometryUtils.mergeBufferGeometries for static objects that are spatially close.To provide a more specific recommendation, are these 200 entities moving during gameplay, or are they entirely environmental?
Use comments to ask for clarification. Post a solution as an answer.
1,680 reputation · 30 Nov 2020, 10:02 UTC
When you merge many static meshes into a single BufferGeometry, the vertex shader runs for every vertex in the combined buffer each frame. Mobile GPUs have a limited post‑transform vertex cache (≈500‑1000 vertices). If the merged geometry exceeds this size, the cache miss rate rises, increasing shader work and memory bandwidth, which can offset the draw‑call savings. A practical rule of thumb is to keep merged batches under ~800 vertices or to split them into several smaller merged groups that still reduce draw calls while staying within the cache window.