remotion-dev/remotion · error · Error
Shrinkwrap shader compile failed: ${log ?? '(no log)'}
Error message
Shrinkwrap shader compile failed: ${log ?? '(no log)'} What it means
The shrinkwrap() effect compiles a complex fragment shader (with fBm noise, multiple curved-fold fields, and specular lighting). If the GLSL compiler rejects the source (COMPILE_STATUS is false), the effect reads the info log, deletes the shader, and throws this Error with the driver diagnostic. The shrinkwrap shader is particularly demanding — it uses nested loops and many function calls that may exceed driver limits.
Source
Thrown at packages/effects/src/shrinkwrap.ts:411
}
`;
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(`Shrinkwrap 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
- Read the info log in the error message to identify the specific compilation failure.
- Update GPU drivers and Chromium to the latest stable version.
- Use a render environment with a more capable WebGL2 implementation (dedicated GPU, newer driver).
- If the shader consistently fails on a target platform, consider whether shrinkwrap() is supported there and file a Remotion issue with the driver info and log.
Example fix
null
Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
null
Try / catch
try {
shrinkwrap({ amount: 1 });
} catch (e) {
if (e instanceof Error && e.message.startsWith('Shrinkwrap shader compile failed')) {
console.error('Shrinkwrap shader compile error:', e.message);
// The shader is very complex — may not be supported on all GPUs
} else {
throw e;
}
} Prevention
- Use a render environment with a capable, up-to-date WebGL2 stack — the shrinkwrap shader is complex and demanding.
- Keep GPU drivers and Chromium current.
- The shader source is a library constant — compile failures indicate a driver/platform limitation.
- Report persistent failures with GPU vendor, driver version, and the full info log from the error message.
When it happens
Trigger: Calling shrinkwrap() on a GPU/driver that cannot compile the shader's fBm loops (4 iterations), multiple curvedFoldField calls, or the extensive math operations. Drivers with strict instruction count limits, loop unrolling caps, or incomplete GLSL ES 3.00 support will fail here. The error message includes the specific compiler diagnostic.
Common situations: Software rasterizers (SwiftShader) with instruction limits; older mobile GPU drivers; low-end integrated graphics with conservative shader resource limits; ANGLE/D3D translation layers that reject complex shaders.
Related errors
- Shine shader compile failed: ${log ?? '(no log)'}
- Shrinkwrap program link failed: ${log ?? '(no log)'}
- Shader compile failed: ${log ?? '(no log)'}
- Program link failed: ${log ?? '(no log)'}
- Noise displacement shader compile failed: ${log ?? '(no log)
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/bcc983f285911c98.
Report an issue: GitHub.