remotion-dev/remotion · error · Error

Roughen edges program link failed: ${log ?? '(no log)'}

Error message

Roughen edges program link failed: ${log ?? '(no log)'}

What it means

The `roughenEdges()` effect's vertex and fragment shaders compiled but `gl.linkProgram()` failed. Because both stages are static constants shipped together, a link failure indicates a driver/GPU bug, a non-conformant GLSL ES 3.00 implementation, or link-time resource limits on constrained hardware. Not reachable through any user param.

Source

Thrown at packages/effects/src/roughen-edges.ts:333

};

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(`Roughen edges program link failed: ${log ?? '(no log)'}`);
	}

	return program;
};

const createSourceTexture = (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;

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Use a conformant desktop GPU with current drivers.
  2. Reinstall `@remotion/effects` to rule out edited shader sources.
  3. Handle context loss/restore so the program is relinked cleanly.
  4. Report the `getProgramInfoLog` text plus renderer string to Remotion.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  roughenEdges()({...});
} catch (err) {
  if (err instanceof Error && /Roughen edges program link failed/.test(err.message)) {
    // log err.message (program info log) and render a fallback without the effect
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: Non-conformant GPU/driver; linking on a half-dead context after a GPU reset; a patched effects package whose VS/FS varying declarations no longer match.

Common situations: Mobile WebViews; headless render servers; remote desktop; forks of `@remotion/effects` with mismatched shader edits.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/a933cbf8b033ecb1. Report an issue: GitHub.