Understanding the performance of WebGLRenderer
can vary greatly depending on the specific use case.
In general, reducing the number of draw calls can lead to improved performance. One way to achieve this is by merging multiple meshes that share the same material into a single geometry, effectively reducing the number of draw calls to just one.
It's important to note that this optimization is only beneficial when the multiple meshes are static relative to each other, as merging them means they can no longer be transformed independently.
Additionally, if a mesh has multiple materials, the renderer will automatically break the geometry into smaller parts, creating separate geometries for each material before rendering.
For a closer look at what's happening behind the scenes, try typing renderer.info
in the console to inspect the returned object for valuable insights.
For a more real-time display of renderer.info
, you can utilize this utility.
three.js r.68