remotion-dev/remotion · error · Error
Failed to create vibrance texture
Error message
Failed to create vibrance texture
What it means
Thrown during vibrance setup when gl.createTexture() returns null. A null texture means WebGL refused to allocate the GL object, which happens on context loss or when the implementation's object/memory limit is exhausted. This is an environmental failure, not a parameter error.
Source
Thrown at packages/effects/src/vibrance.ts:144
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);
gl.linkProgram(program);
gl.deleteShader(vertexShader);
gl.deleteShader(fragmentShader);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const log = gl.getProgramInfoLog(program);
gl.deleteProgram(program);
throw new Error(`Vibrance shader link failed: ${log ?? '(no log)'}`);
}
return program;
};
const createTexture = (gl: WebGL2RenderingContext): WebGLTexture => {
const texture = gl.createTexture();
if (!texture) {
throw new Error('Failed to create vibrance texture');
}
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
gl.bindTexture(gl.TEXTURE_2D, null);
return texture;
};
const setupVibrance = (target: HTMLCanvasElement): VibranceState => {
const gl = target.getContext('webgl2', {
premultipliedAlpha: true,
alpha: true,
preserveDrawingBuffer: true,
});
if (!gl) {View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Reload to reset the WebGL2 context and free GL objects.
- Lower the count of simultaneously-active WebGL effects and verify effects are disposed when offscreen.
- Check gl.isContextLost() diagnostics (chrome://gpu) and ensure hardware acceleration is on.
- Update GPU drivers if context loss is recurring on otherwise idle hardware.
Example fix
// before
const effect = vibrance({amount: 1}); // setup can throw if createTexture returns null
// after - guard effect creation and degrade gracefully
const effect = (() => {
try {
return vibrance({amount: 1});
} catch {
return null;
}
})(); Defensive patterns
Strategy: try-catch
Try / catch
let effect = null;
try {
effect = vibrance({amount: 1});
} catch (err) {
console.warn('vibrance texture alloc failed, skipping effect', err);
} Prevention
- Dispose offscreen WebGL effects to keep the live GL object count down.
- Listen for 'webglcontextlost' and rebuild effects after 'webglcontextrestored'.
- Avoid stacking many texture-heavy effects on the same frames.
- Render on a machine with adequate GPU memory for the chosen resolution.
When it happens
Trigger: setupVibrance() calls createTexture(gl) right after creating the program/VAO/VBO; gl.createTexture() returns null because the context is lost (isContextLost() true) or too many GL objects are already live.
Common situations: Context loss from many concurrent effects in Studio; GPU memory exhaustion; rendering a long composition that leaks or accumulates GL objects; headless Chrome with constrained resources.
Related errors
- Failed to create vibrance vertex array
- Failed to create vibrance vertex buffer
- Failed to create WebGL vertex array
- Failed to create WebGL buffer
- Failed to create WebGL shader
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/deeb3c22f39641c0.
Report an issue: GitHub.