The Engine constructor accepts several important options:

  • antialias (boolean): Enables antialiasing for smoother edges
  • preserveDrawingBuffer (boolean): Required for taking screenshots of the canvas
  • stencil (boolean): Enables stencil buffer for advanced rendering effects
  • premultipliedAlpha (boolean): Controls alpha blending behavior
  • adaptToDeviceRatio (boolean): Adjusts rendering resolution based on device pixel ratio

Starting with Babylon.js 6.0 and significantly enhanced in 8.0, the Engine architecture supports both WebGL and WebGPU backends. WebGPU support is now complete and stable, with native WGSL shader support eliminating the need for a GLSL-to-WGSL conversion layer, resulting in smaller bundles and better performance on compatible browsers.