remotion-dev/remotion · error · Error
Halftone program link failed: ${log ?? '(no log)'}
Error message
Halftone program link failed: ${log ?? '(no log)'} What it means
Thrown by linkProgram() in the halftone effect when gl.getProgramParameter(program, gl.LINK_STATUS) is false after gl.linkProgram(). The driver program-info log is appended (or '(no log)'). The vertex and fragment shaders each compiled, but linking them together failed. Since both shaders are fixed library code, a link failure points at a driver/WebGL2 bug rather than user input.
Source
Thrown at packages/effects/src/halftone.ts:387
};
const linkProgram = (
gl: WebGL2RenderingContext,
vs: WebGLShader,
fs: WebGLShader,
): WebGLProgram => {
const program = gl.createProgram();
if (!program) {
throw new Error('Failed to create WebGL program');
}
gl.attachShader(program, vs);
gl.attachShader(program, fs);
gl.linkProgram(program);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const log = gl.getProgramInfoLog(program);
gl.deleteProgram(program);
throw new Error(`Halftone program link failed: ${log ?? '(no log)'}`);
}
return program;
};
// Halftone effect (WebGL2). Converts luminance into a grid of dots, squares,
// or lines. Each fragment determines its nearest grid cell and whether it falls
// inside a dot, so edge dots are never culled. `dotSpacing` sets the grid pitch
// (defaults to `dotSize`). `sampling` controls texture interpolation when
// reading luminance at grid centres. `invert` inverts the pattern so
// bright/transparent areas produce larger dots and dark areas produce fewer.
// `colorMode` controls whether dots use a solid `dotColor` or the sampled source
// color at each grid cell.
export const halftone = createEffect<HalftoneParams, HalftoneState>({
type: 'dev.remotion.effects.halftone',
label: 'halftone()',
documentationLink: 'https://www.remotion.dev/docs/effects/halftone',
backend: 'webgl2',View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Read the program info log embedded in the message — it states the exact link failure.
- Render on a machine with a known-good WebGL2 stack (hardware acceleration or Remotion's bundled headless shell).
- Update the GPU driver.
- If transient, restart the render once to get a fresh GL context.
Defensive patterns
Strategy: try-catch
Try / catch
try {
// ...use halftone()
} catch (e) {
if (e instanceof Error && e.message.startsWith('Halftone program link failed')) {
// driver info log is in e.message; switch to a known-good WebGL2 stack
console.error(e.message);
} else throw e;
} Prevention
- Render with hardware acceleration enabled or use Remotion's bundled headless shell.
- Keep GPU drivers current so GLSL ES 3.00 linking works.
- Smoke-test one WebGL2-backed effect in CI to fail fast on driver issues.
When it happens
Trigger: Linking the halftone program on a driver that mis-handles varying interpolation, uniform layout, or attribute binding between the two fixed shaders; software GL with incomplete linkers; context-degraded state after a GPU fault.
Common situations: Headless rendering with swiftshader or old mesa; remote Linux render boxes; post-crash context; transient driver faults.
Related errors
- Halftone shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
- Checkerboard shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
- Shader compile failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/e5e6385a3f2c8ffe.
Report an issue: GitHub.