babylon.js maximum fps
Babylon.js does not have an inherent "hard" maximum FPS cap. Its performance is primarily limited by the browser's refresh rate (via requestAnimationFrame) and your hardware's capabilities.Key Performance LimitsVSync & Monitor Refresh Rate: By default, Babylon.js synchronizes with your monitor's refresh rate. On a standard 60Hz monitor, it targets 60 FPS; on a 144Hz monitor, it will attempt to reach 144 FPS.Browser Caps: Most browsers cap the frame rate to match the display to prevent screen tearing. You can sometimes bypass this for testing by disabling VSync via browser flags like --disable-gpu-vsync.Absolute FPS: This represents the theoretical speed your code could run if it weren't capped by the monitor. You can calculate this using the SceneInstrumentation tool to see your "raw" performance potential.How to Control FPSIf you need to manage your frame rate manually, you have a few options:SceneOptimizer: You can use the SceneOptimizer to set a targetFrameRate (default is 60). It will automatically lower rendering quality to maintain this target.Manual Limiting: You can artificially cap the FPS by using a setTimeout or a custom timer within your engine.runRenderLoop to skip frames.Deterministic Lockstep: For physics-heavy applications where consistency is more important than raw speed, you can use Deterministic Lockstep to ensure the simulation runs at a fixed frequency regardless of the rendering FPS.Optimization for Higher FPSTo reach higher frame rates on complex scenes, the Babylon.js Documentation recommends:Freezing Active Meshes: Use scene.freezeActiveMeshes() to skip CPU-heavy mesh selection every frame.Reducing Draw Calls: Use instances or thin instances to render many identical objects efficiently.Merging Meshes: Combine static geometry into a single mesh to reduce overhead.
Public Last updated: 2026-05-09 05:29:23 PM