BabylonJS/Babylon.js · error · Error
FrameGraphVolumetricLightingTask "${name}": the current conf
Error message
FrameGraphVolumetricLightingTask "${name}": the current configuration is not supported. Use FrameGraphVolumetricLightingTask.IsSupported(engine, enableExtinction) to check before creating this task. What it means
FrameGraphVolumetricLightingTask's constructor throws when the engine cannot run the volumetric lighting effect for the requested configuration. The library requires you to check the static FrameGraphVolumetricLightingTask.IsSupported(engine, enableExtinction) before constructing the task, because enabling extinction (or the engine's capabilities) may not be supported on the current hardware/engine setup. Throwing early with this message makes the unsupported configuration explicit instead of failing later in the shader.
Source
Thrown at packages/dev/core/src/FrameGraph/Tasks/PostProcesses/volumetricLightingTask.ts:173
*/
public readonly outputTexture: FrameGraphTextureHandle;
private readonly _clearLightingVolumeTextureTask: FrameGraphClearTextureTask;
private readonly _renderLightingVolumeTask: FrameGraphObjectRendererTask;
private readonly _blendLightingVolumeTask: FrameGraphVolumetricLightingBlendVolumeTask;
private _renderLightingVolumeMaterial: ShaderMaterial;
/**
* Creates a new FrameGraphVolumetricLightingTask.
* @param name The name of the task.
* @param frameGraph The frame graph to which the task belongs.
* @param enableExtinction Whether to enable extinction in the volumetric lighting effect (default: false). If you don't plan to set extinction to something different than (0, 0, 0), you can disable this to save some performance.
*/
constructor(name: string, frameGraph: FrameGraph, enableExtinction = false) {
super(name, frameGraph);
if (!FrameGraphVolumetricLightingTask.IsSupported(frameGraph.engine, enableExtinction)) {
throw new Error(
`FrameGraphVolumetricLightingTask "${name}": the current configuration is not supported. Use FrameGraphVolumetricLightingTask.IsSupported(engine, enableExtinction) to check before creating this task.`
);
}
this.enableExtinction = enableExtinction;
const isWebGPU = this._frameGraph.engine.isWebGPU;
this._renderLightingVolumeMaterial = new ShaderMaterial(`${name} - render lighting volume`, this._frameGraph.scene, "volumetricLightingRenderVolume", {
attributes: ["position"],
uniformBuffers: ["Scene", "Mesh"],
uniforms: ["world", "viewProjection", "vEyePosition", "lightDir", "invViewProjection", "outputTextureSize", "extinctionPhaseG", "lightPower", "textureRatio"],
samplers: ["depthTexture"],
defines: enableExtinction ? ["USE_EXTINCTION"] : [],
shaderLanguage: isWebGPU ? ShaderLanguage.WGSL : ShaderLanguage.GLSL,
needAlphaBlending: true,
});
this._renderLightingVolumeMaterial.backFaceCulling = false;
View on GitHub (pinned to 0592b347b8)
Solutions
- Before constructing, call FrameGraphVolumetricLightingTask.IsSupported(frameGraph.engine, enableExtinction) and only create the task if it returns true.
- If IsSupported fails with enableExtinction = true, retry with enableExtinction = false (extinction defaults to (0,0,0) anyway if you don't need it).
- If IsSupported fails even with extinction disabled, skip the volumetric lighting task entirely or fall back to an alternative effect.
- Check engine capabilities / upgrade to WebGL2 context if extinction support is required.
- Ensure you are on a recent Babylon.js version; support checks and extension requirements have evolved across versions.
Example fix
// before
const volumetric = new FrameGraphVolumetricLightingTask("volumetric", frameGraph, true);
// after
if (FrameGraphVolumetricLightingTask.IsSupported(frameGraph.engine, true)) {
const volumetric = new FrameGraphVolumetricLightingTask("volumetric", frameGraph, true);
} else if (FrameGraphVolumetricLightingTask.IsSupported(frameGraph.engine, false)) {
const volumetric = new FrameGraphVolumetricLightingTask("volumetric", frameGraph, false);
} else {
// fall back: no volumetric lighting
} Defensive patterns
Strategy: validation
Validate before calling
if (!FrameGraphVolumetricLightingTask.IsSupported(engine, enableExtinction)) {
// fall back or skip creation
} else {
const task = new FrameGraphVolumetricLightingTask(name, frameGraph, enableExtinction);
} Type guard
function supportsVolumetric(engine: ThinEngine, enableExtinction: boolean): boolean {
return FrameGraphVolumetricLightingTask.IsSupported(engine, enableExtinction);
} Try / catch
let task: FrameGraphVolumetricLightingTask | undefined;
try {
task = new FrameGraphVolumetricLightingTask(name, frameGraph, enableExtinction);
} catch (e) {
console.warn("Volumetric lighting unsupported, falling back:", e);
task = undefined;
} Prevention
- Always gate task creation behind FrameGraphVolumetricLightingTask.IsSupported().
- Test on your lowest-capability target (WebGL1/mobile) not just desktop WebGL2.
- Default enableExtinction to false unless you actually set a non-zero extinction color.
- Centralize capability checks in one helper used by all post-process task creation.
When it happens
Trigger: Calling new FrameGraphVolumetricLightingTask(name, frameGraph, enableExtinction) when FrameGraphVolumetricLightingTask.IsSupported(frameGraph.engine, enableExtinction) returns false — typically when enableExtinction is true but the engine lacks the required support (e.g. webgl1 or missing extension), or the engine does not support the volumetric lighting effect at all.
Common situations: Running Babylon.js on WebGL1 or a device without the needed texture/format support while creating volumetric lighting; enabling the extinction parameter by default without checking hardware capability; code written on a WebGL2 desktop machine then deployed to mobile/limited GPU environments.
Related errors
- Unable to create webGL texture
- FrameGraphDepthOfFieldBlurTask "${this.name}": sourceTexture
- FrameGraphBloomMergeTask "${this.name}": sourceTexture, circ
- FrameGraphDepthOfFieldTask: sourceTexture, depthTexture and
- FrameGraphMotionBlurTask "${this.name}": sourceTexture is re
AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30).
Data as JSON: /api/errors/40073c3414d40073.
Report an issue: GitHub.