This is a scene from my game, and I use several babylon.js components and I see the GPU usage is around 30% on my desktop (Nvidia 3080TI) and around 65% on a midrange laptop. There are no known CPU issues as I have done some CPU optimizations.
Is there any BABYLON.Engine or BABYLON.Scene properties I should consider for better performance for GPU performance ?
I use a lot of shadows generated by BABYLON.CascadedShadowGenerator with this setup
self.mainshadow = new BABYLON.CascadedShadowGenerator(1024, light); self.mainshadow.forceBackFacesOnly = true; self.mainshadow.numCascades = 0; self.mainshadow.usePercentageCloserFiltering = true; self.mainshadow.cascadeBlendPercentage = 0; self.mainshadow.freezeShadowCastersBoundingInfo = true; self.mainshadow.filteringQuality = BABYLON.ShadowGenerator.QUALITY_LOW; self.mainshadow.shadowMaxZ = 35; self.mainshadow.autoCalcDepthBoundsRefreshRate = 60; let smap = self.mainshadow.getShadowMap(); smap.refreshRate = 2
- I use BABYLON.GPUParticleSystem for effects on the environment (mist, flames, gas etc) is there any settings here I should consider for performance ? I use “addSizeGradient” to control the visibility/lifetime for the particles. As there are limited control on a GPU particle. A typically scene can have around 150k particles.