{"record":{"id":"f3b08821d351e6bc","repo":"remotion-dev/remotion","slug":"shrinkwrap-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Shrinkwrap program link failed: ${log ?? '(no log)'}","messagePattern":"Shrinkwrap program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/shrinkwrap.ts","lineNumber":433,"sourceCode":"};\n\nconst linkProgram = (\n\tgl: WebGL2RenderingContext,\n\tvs: WebGLShader,\n\tfs: WebGLShader,\n): WebGLProgram => {\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create WebGL program');\n\t}\n\n\tgl.attachShader(program, vs);\n\tgl.attachShader(program, fs);\n\tgl.linkProgram(program);\n\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n\t\tconst log = gl.getProgramInfoLog(program);\n\t\tgl.deleteProgram(program);\n\t\tthrow new Error(`Shrinkwrap program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nexport const shrinkwrap = createEffect<ShrinkwrapParams, ShrinkwrapState>({\n\ttype: 'dev.remotion.effects.shrinkwrap',\n\tlabel: 'shrinkwrap()',\n\tdocumentationLink: 'https://www.remotion.dev/docs/effects/shrinkwrap',\n\tbackend: 'webgl2',\n\tcalculateKey: (params) => {\n\t\tconst r = resolve(params);\n\t\treturn `shrinkwrap-${r.amount}-${r.displacement}-${r.highlightIntensity}-${r.wrinkleDensity}-${r.edgeTension}-${r.phase}-${r.seed}`;\n\t},\n\tsetup: (target) => {\n\t\tconst gl = target.getContext('webgl2', {\n\t\t\tpremultipliedAlpha: true,\n\t\t\talpha: true,","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/shrinkwrap.ts#L415-L451","documentation":"The shrinkwrap() effect links its compiled vertex and fragment shaders via gl.linkProgram(). If linking fails (LINK_STATUS is false), the effect reads the info log, deletes the program, and throws this Error with the diagnostic. The shrinkwrap fragment shader is unusually complex (fBm noise with 4x loops, multiple curved-fold field evaluations, specular lighting), so link-time resource allocation can exceed driver limits even when both shaders compile individually.","triggerScenarios":"Calling shrinkwrap() on a GPU/driver that compiles both shaders but fails to link due to exceeded uniform/varying limits, instruction count after link-time optimization, or total register pressure. The complex shader increases the chance of hitting these limits vs. simpler effects.","commonSituations":"Older or low-end GPUs with conservative uniform/temporary register limits; software rasterizers (SwiftShader) with strict link-time resource caps; driver bugs in link-time allocation for complex fragment shaders; specific GPU families with known ANGLE translation issues.","solutions":["Read the info log in the error message for the specific link diagnostic.","Update GPU drivers and the Chromium version to the latest release.","Switch to a render environment with a more capable WebGL2 stack.","File a Remotion issue including the GPU vendor, driver version, and full info log — the shader complexity may need a portability fix."],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"try {\n  shrinkwrap({ amount: 1 });\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Shrinkwrap program link failed')) {\n    console.error('Shrinkwrap program link error:', e.message);\n    // Very complex shader — may exceed driver link-time limits\n  } else {\n    throw e;\n  }\n}","preventionTips":["Use a render environment with a capable WebGL2 implementation — the shrinkwrap shader is one of the most complex in the effects package.","Keep GPU drivers and Chromium up to date.","Link failures on complex shaders often indicate resource limit issues on the GPU/driver.","Report persistent link failures with the GPU vendor, driver version, and full info log."],"tags":["webgl2","gpu","program","glsl","driver-compat","complex-shader"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}