remotion-dev/remotion · error · Error
Failed to create WebGL texture
Error message
Failed to create WebGL texture
What it means
Thrown by createRgbaTexture() in the linear-progressive-blur runtime when gl.createTexture() returns null. The runtime needs two RGBA textures (source and intermediate ping-pong), so a null texture aborts setup because there is no surface to render the blur passes into.
Source
Thrown at packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts:107
return program;
};
const getUniforms = (
gl: WebGL2RenderingContext,
program: WebGLProgram,
): LinearProgressiveBlurUniforms => ({
uSource: gl.getUniformLocation(program, 'uSource'),
uTexelSize: gl.getUniformLocation(program, 'uTexelSize'),
uStart: gl.getUniformLocation(program, 'uStart'),
uEnd: gl.getUniformLocation(program, 'uEnd'),
uStartBlur: gl.getUniformLocation(program, 'uStartBlur'),
uEndBlur: gl.getUniformLocation(program, 'uEndBlur'),
});
const createRgbaTexture = (gl: WebGL2RenderingContext): WebGLTexture => {
const texture = gl.createTexture();
if (!texture) {
throw new Error('Failed to create WebGL 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;
};
export const setupLinearProgressiveBlur = (
target: HTMLCanvasElement,
): LinearProgressiveBlurState => {
const gl = target.getContext('webgl2', {
premultipliedAlpha: true,
alpha: true,
preserveDrawingBuffer: true,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Restart Chrome / the worker and retry once.
- Reduce output resolution or lower `--concurrency` / framesPerLambda to cut texture memory.
- Force software rendering (`--gl=angle --angle-backend=swiftshader`) with enough host RAM.
- Raise Lambda memory if the GPU process is OOM-killed.
- Ensure effect cleanup runs so textures are returned between compositions.
Defensive patterns
Strategy: retry
Validate before calling
function canAllocateTexture(canvas: HTMLCanvasElement): boolean {
const gl = canvas.getContext('webgl2');
if (!gl) return false;
const t = gl.createTexture();
const ok = t !== null;
if (t) gl.deleteTexture(t);
return ok;
} Try / catch
try {
renderWithLinearProgressiveBlur();
} catch (err) {
if (err instanceof Error && err.message === 'Failed to create WebGL texture') {
await restartRendererWorker();
renderWithLinearProgressiveBlur();
} else throw err;
} Prevention
- Keep output resolution reasonable — this effect allocates two target-sized RGBA textures.
- Lower concurrency on large renders to reduce texture memory pressure.
- Run effect cleanup to release textures between compositions.
- Raise Lambda memory if the GPU process is OOM-killed.
When it happens
Trigger: WebGL2 context refuses texture allocation — context on the verge of loss, GPU texture memory exhausted, or driver object limit reached. The runtime allocates textures sized to the target canvas, so very large outputs amplify memory pressure.
Common situations: Large composition resolutions (4K+) with high concurrency; integrated GPUs with limited texture memory; long-running workers leaking textures; GPU process crash leaving allocations failing.
Related errors
- Failed to create WebGL texture
- Failed to create WebGL texture
- Failed to create WebGL texture
- Failed to create WebGL texture
- Failed to create WebGL texture
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/30fee70b55f30fda.
Report an issue: GitHub.