{"record":{"id":"c896cdcb8c1cc500","repo":"remotion-dev/remotion","slug":"vignette-shader-compile-failed-log-no-log","errorCode":null,"errorMessage":"Vignette shader compile failed: ${log ?? '(no log)'}","messagePattern":"Vignette shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/vignette.ts","lineNumber":277,"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(`Vignette 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":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/vignette.ts#L259-L295","documentation":"Thrown by vignette's compileShader when gl.getShaderParameter(COMPILE_STATUS) is false after gl.compileShader. The shader info log is appended (or '(no log)'). Because vignette's GLSL ES 3.00 shaders are hardcoded library constants, a compile failure almost always points to a driver bug, context loss, or a GPU that does not support the required GLSL features rather than user input.","triggerScenarios":"createProgram compiles the internal VIGNETTE_VS / VIGNETTE_FS sources; the driver returns COMPILE_STATUS false. Triggers include a buggy driver, context loss during compile, or a GPU/driver lacking GLSL ES 3.00 support.","commonSituations":"Outdated GPU drivers; software/SwiftShader rendering that mishandles the shader; context loss mid-setup in Studio; VMs without proper GL 3.0 ES support.","solutions":["Reload the page/Studio to reset context and retry compile.","Update GPU drivers / enable hardware WebGL2 acceleration.","For server rendering, confirm the Chrome/GPU combo passes WebGL2 conformance.","Capture the appended info log and report it against @remotion/effects with driver details if it persists."],"exampleFix":"// before\nconst effect = vignette({amount: 0.6});\n\n// after - degrade to the unprocessed source on compile failure\nconst effect = (() => {\n  try { return vignette({amount: 0.6}); } catch (err) { console.warn(err); return null; }\n})();","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"let effect = null;\ntry {\n  effect = vignette({amount: 0.6});\n} catch (err) {\n  console.warn('vignette shader compile failed (driver/GPU issue), skipping', err);\n}","preventionTips":["Keep GPU drivers current so the hardcoded GLSL compiles.","Use hardware-accelerated WebGL2; avoid software rendering where the shader may be rejected.","Handle context loss and rebuild effects on restore.","Reduce concurrent shader-heavy effects to avoid compile-time context loss."],"tags":["webgl2","shader","gpu","context-loss","vignette"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}