remotion-dev/remotion · error · Error

Dot grid shader compile failed: ${log ?? '(no log)'}

Error message

Dot grid shader compile failed: ${log ?? '(no log)'}

What it means

Thrown by dot-grid's compileShader helper after gl.getShaderParameter returns a failed COMPILE_STATUS. The message embeds the GLSL info log from the driver. Because the vertex and fragment shaders are bundled constants, a compile failure almost always indicates a driver bug, a non-conformant WebGL2 implementation, or GLSL ES 3.00 unsupported on the device.

Source

Thrown at packages/effects/src/dot-grid.ts:166

	uInvert: WebGLUniformLocation | null;
};

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(`Dot grid 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);
	gl.attachShader(program, fs);
	gl.linkProgram(program);

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Read the embedded info log to identify which GLSL line/feature the driver rejected.
  2. Update GPU drivers and the browser; retry on a different device or browser.
  3. For headless/CI, switch to a SwiftShader software renderer which has conformant GLSL ES 3.00 support.
  4. If the log points to a genuine bug in the bundled shader, file a Remotion issue with the full log and GPU/driver details.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  state = dotGrid().setup(canvas);
} catch (err) {
  if (err instanceof Error && /shader compile failed/i.test(err.message)) {
    console.error('Driver rejected dot-grid GLSL:', err.message);
    // fall back to a CSS / SVG dot grid, or skip the effect
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: The bundled DOT_GRID_VS or DOT_GRID_FS fails to compile on the user's GPU/driver. Typical of outdated mobile GPUs, virtualized GPUs, or buggy drivers that reject valid #version 300 es GLSL. The info log in the error message names the offending line/feature.

Common situations: Older Android GPUs with stale drivers; virtual machines with passthrough GL; remote desktops over RDP; browsers falling back to a software rasterizer that drops precision qualifiers; very old Intel integrated GPUs.

Related errors


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