{"record":{"id":"fc907cb85def2f05","repo":"remotion-dev/remotion","slug":"burlap-shader-compile-failed-log-no-log","errorCode":null,"errorMessage":"Burlap shader compile failed: ${log ?? '(no log)'}","messagePattern":"Burlap shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/burlap.ts","lineNumber":247,"sourceCode":"}\n`;\n\nconst compileShader = (\n\tgl: WebGL2RenderingContext,\n\ttype: number,\n\tsource: string,\n): WebGLShader => {\n\tconst shader = gl.createShader(type);\n\tif (!shader) {\n\t\tthrow new Error('Failed to create WebGL shader');\n\t}\n\n\tgl.shaderSource(shader, source);\n\tgl.compileShader(shader);\n\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\tconst log = gl.getShaderInfoLog(shader);\n\t\tgl.deleteShader(shader);\n\t\tthrow new Error(`Burlap shader compile failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn shader;\n};\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);","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/burlap.ts#L229-L265","documentation":"Thrown by burlap's `compileShader` when the GLSL source compiled with a falsy COMPILE_STATUS; the driver's info log is embedded. BURLAP_VS/BURLAP_FS are library constants, so a compile failure points to a shader regression or a GLSL ES 3.00 feature the driver rejects (burlap uses a complex procedural-noise fragment shader).","triggerScenarios":"Fires at line 247 after `gl.compileShader` when `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` is falsy, during `setupBurlap`.","commonSituations":"A shipped burlap shader revision with a syntax/type/precision error; older driver rejecting integer bit-ops or loop constructs in the noise functions; software rasterizer with weak GLSL support; truncated shader from a broken build.","solutions":["Read the info log in the message — it cites the GLSL line of the error.","Update @remotion/effects; shader bugs are patched upstream.","Reproduce on a discrete GPU and a second browser to isolate driver-specific rejection.","For headless CI, confirm WebGL2 is hardware-backed and capture GL_RENDERER."],"exampleFix":"// Library-internal shader issue; not fixable at the call site.\n// Capture the info log and GL_RENDERER and report upstream:\nconsole.error(gl.getParameter(gl.RENDERER), gl.getParameter(gl.SHADING_LANGUAGE_VERSION));","handlingStrategy":"fallback","validationCode":"// Probe compile capability with a trivial shader before setup.\nconst probe = gl.createShader(gl.FRAGMENT_SHADER);\nif (!probe) { /* skip */ }\ngl.shaderSource(probe, 'void main(){}');\ngl.compileShader(probe);\nconst ok = gl.getShaderParameter(probe, gl.COMPILE_STATUS);\ngl.deleteShader(probe);\nif (!ok) { /* fall back */ }","typeGuard":null,"tryCatchPattern":"try {\n  burlap.setup(canvas);\n} catch (err) {\n  if (/Burlap shader compile failed/.test(err.message)) {\n    // log the info log, fall back to a non-WebGL effect\n  } else { throw err; }\n}","preventionTips":["Pin @remotion/effects to a tested version.","Log GL_RENDERER and SHADING_LANGUAGE_VERSION with errors.","Keep a CPU/2D fallback for shader-incompatible environments."],"tags":["webgl2","shader","glsl","burlap","driver","compile"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}