remotion-dev/remotion · critical · Error

Thermal vision shader compile failed: ${log ?? '(no log)'}

Error message

Thermal vision shader compile failed: ${log ?? '(no log)'}

What it means

The thermal vision effect's GLSL shader failed to compile. After `gl.createShader` succeeds and the source is uploaded, the driver reports `COMPILE_STATUS === false` and the info log is appended. The shader sources (`THERMAL_VISION_VS`/`THERMAL_VISION_FS`) are static library constants, so a compile failure almost always indicates a driver/GPU compatibility bug rather than user input. The shader is deleted before throwing.

Source

Thrown at packages/effects/src/thermal-vision.ts:164

}
`;

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(
			`Thermal vision 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. Read the info log embedded in the message to find the driver's GLSL error.
  2. Update GPU drivers and browser to the latest version.
  3. Reproduce on another machine/browser to isolate a driver-specific bug.
  4. If editing the shader source, validate against GLSL ES 3.00 (e.g. `precision` qualifier present, `texture()` used for sampler2D in ES 3.00).
  5. Report the driver/browser and info log to Remotion maintainers if shaders are unmodified.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  thermalVision({...params});
} catch (e) {
  const msg = (e as Error).message;
  if (/shader compile failed/.test(msg)) {
    console.error('Driver GLSL bug:', msg);
    renderFallbackFrame();
  } else throw e;
}

Prevention

When it happens

Trigger: A GPU driver rejecting valid GLSL ES 3.00 (`#version 300 es`) code; a browser/OS combination with a buggy WebGL2 implementation; a regression introduced by editing the bundled shader strings.

Common situations: Outdated mobile GPU drivers; older integrated GPUs; software-rendered WebGL2 (SwiftShader/LLVMpipe) with GLSL gaps; a library regression after modifying `THERMAL_VISION_FS` or `THERMAL_VISION_VS`.

Related errors


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