BabylonJS/Babylon.js · error

Geometry buffer renderer is not supported but is required fo

Error message

Geometry buffer renderer is not supported but is required for GIRSMManager.

What it means

GIRSMManager relies on the geometry buffer renderer (GBuffer) to capture position/normal data for global illumination. If the renderer reports it is unsupported (e.g. `isSupported` false on the engine/extension), `_createPostProcesses` throws because RSM cannot function without the GBuffer.

Source

Thrown at packages/dev/core/src/Rendering/GlobalIllumination/giRSMManager.pure.ts:598

        if (this._firstActivation) {
            this._firstActivation = false;
            this._geomBufferEnabled = !!this._scene.geometryBufferRenderer;
            this._geomBufferEnablePosition = this._scene.geometryBufferRenderer?.enablePosition ?? false;
        }

        if (!this._geomBufferEnabled) {
            this._scene.disableGeometryBufferRenderer();
        }

        const geometryBufferRenderer = this._scene.enableGeometryBufferRenderer(
            this._enableBlur ? this._outputDimensions : this._giTextureDimensions,
            this._use32BitsDepthBuffer ? Constants.TEXTUREFORMAT_DEPTH32_FLOAT : Constants.TEXTUREFORMAT_DEPTH16,
            GIRSMManager.GeometryBufferTextureTypesAndFormats
        );

        if (!geometryBufferRenderer) {
            throw new Error("Geometry buffer renderer is not supported but is required for GIRSMManager.");
        }

        geometryBufferRenderer.enablePosition = true;
        if (!this._geomBufferEnabled) {
            geometryBufferRenderer.generateNormalsInWorldSpace = true;
        }

        const decodeGeometryBufferNormals = geometryBufferRenderer.normalsAreUnsigned;
        const normalsAreInWorldSpace = geometryBufferRenderer.generateNormalsInWorldSpace;

        this._counters.push({ name: "Geometry buffer renderer", value: 0 });
        this._countersRTW.push([this._scene.geometryBufferRenderer!.getGBuffer().renderTarget!]);

        let defines = "";
        if (decodeGeometryBufferNormals) {
            defines += "#define DECODE_NORMAL\n";
        }
        if (!normalsAreInWorldSpace) {

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Check `engine._features` / geometry-buffer-renderer support (`PrePassRenderer.IsSupported(engine)` or equivalent) before instantiating GIRSMManager and show a fallback
  2. Upgrade to a browser/GPU that supports the required MRT and float depth formats
  3. Switch the GI technique (e.g. use a different GI approach or disable GIRSM) on unsupported hardware
  4. Verify engine creation (WebGL2 vs WebGL1) — WebGL1 lacks required MRT features

Example fix

// before
const girlManager = new GIRSMManager(scene); // may throw on unsupported engines
// after
if (PrePassRenderer.IsSupported(scene.getEngine())) {
  const giManager = new GIRSMManager(scene);
} else {
  console.warn("GIRSM unsupported on this engine; using fallback lighting");
}
Defensive patterns

Strategy: fallback

Validate before calling

if (!PrePassRenderer.IsSupported(scene.getEngine())) {
  console.warn('GIRSM not supported on this engine/hardware; using fallback lighting');
} else {
  const giManager = new GIRSMManager(scene);
}

Type guard

function supportsGIRSM(scene: BABYLON.Scene): boolean {
  return BABYLON.PrePassRenderer.IsSupported(scene.getEngine());
}

Try / catch

try {
  const giManager = new GIRSMManager(scene);
} catch (e) {
  if (e.message.includes('Geometry buffer renderer is not supported')) {
    // fall back to standard lighting pipeline
  }
}

Prevention

When it happens

Trigger: `GIRSMManager._createPostProcesses` (invoked via recreateResources) calls `new PrePassRenderer`-based geometry buffer creation which returns null when the engine/hardware does not support the required render-target features (e.g. multiple render targets, float textures).

Common situations: Running on hardware or a WebGL/WebGPU context lacking MRT or depth-texture support; using a thin engine/backend without the geometry buffer renderer extension; old devices or software renderers.

Related errors


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/2f913fc06efda493. Report an issue: GitHub.