remotion-dev/remotion · error · Error

Contour lines shader compile failed: ${log ?? '(no log)'}

Error message

Contour lines shader compile failed: ${log ?? '(no log)'}

What it means

Thrown by compileShader in contour-lines.ts when gl.getShaderParameter(shader, gl.COMPILE_STATUS) returns false after gl.compileShader(). The shader source (CONTOUR_LINES_VS or CONTOUR_LINES_FS) failed to compile, and the GLSL info log is included. Since the shader source is a library constant, a compile failure usually points to a GPU/driver that does not support a required GLSL ES 3.00 feature rather than a user error.

Source

Thrown at packages/effects/src/contour-lines.ts:361

}
`;

const compileShader = (
	gl: WebGL2RenderingContext,
	type: number,
	source: string,
): WebGLShader => {
	const shader = gl.createShader(type);
	if (!shader) {
		throw new Error('Failed to create WebGL shader');
	}

	gl.shaderSource(shader, source);
	gl.compileShader(shader);
	if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
		const log = gl.getShaderInfoLog(shader);
		gl.deleteShader(shader);
		throw new Error(
			`Contour lines shader compile failed: ${log ?? '(no log)'}`,
		);
	}

	return shader;
};

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);

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Update GPU drivers to the latest version.
  2. Use a different rendering environment with a more complete WebGL2 implementation (e.g. Chrome with hardware acceleration rather than a limited software fallback).
  3. For headless Remotion rendering, ensure the Chrome build includes GPU support or a full SwiftShader implementation.
  4. Report the info log contents to Remotion if it occurs on a modern, fully-capable GPU — it may indicate a shader compatibility bug.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  contourLines({...})(source, target);
} catch (e) {
  if (e instanceof Error && e.message.startsWith('Contour lines shader compile failed')) {
    // driver/GPU compatibility issue — not a parameter problem
    // capture e.message (includes GLSL info log) for diagnostics
  }
  throw e;
}

Prevention

When it happens

Trigger: setupContourLines compiles the vertex or fragment shader, and the GLSL compiler rejects it. The error includes the info log from gl.getShaderInfoLog(). This is internal to the contour-lines effect setup and is not caused by user parameter values.

Common situations: GPU or driver lacks full GLSL ES 3.00 (#version 300 es) support despite advertising WebGL2; outdated mobile GPU drivers; a browser bug in shader translation layer; running on a virtual GPU with incomplete GLSL support; the contour-lines shader uses features (highp float, textureless noise) not supported on the device.

Related errors


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