{"record":{"id":"fcde51bc04bb86d2","repo":"remotion-dev/remotion","slug":"metallic-swirl-shader-compile-failed-log-n","errorCode":null,"errorMessage":"Metallic swirl shader compile failed: ${log ?? '(no log)'}","messagePattern":"Metallic swirl shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/brand/src/effects/metallic-swirl-effect.ts","lineNumber":470,"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(\n\t\t\t`Metallic swirl shader compile failed: ${log ?? '(no log)'}`,\n\t\t);\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);","sourceCodeStart":452,"sourceCodeEnd":488,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/brand/src/effects/metallic-swirl-effect.ts#L452-L488","documentation":"In `compileShader`, `gl.compileShader` ran but `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` is false. The message includes the GLSL info log. The shipped VERTEX_SHADER and FRAGMENT_SHADER sources are fixed, so in normal use this should not occur; it indicates a driver/GSL bug, a corrupted shader source, or an unsupported GLSL ES 3.00 feature on the target GPU.","triggerScenarios":"Running on a GPU/driver whose GLSL ES 3.00 compiler rejects the fixed shader (rare driver bug); a corrupted build where FRAGMENT_SHADER/VERTEX_SHADER strings were mangled; a WebGL2 context that is actually a downgraded implementation.","commonSituations":"Older mobile GPUs; buggy driver versions; content-security or transpiler pipelines that mangle template literal shaders; rendering on a virtual GPU.","solutions":["Read the full info log in the error message to see the GLSL line the driver rejected.","Update GPU drivers / switch to a hardware-accelerated browser.","If you forked the shader source, validate the GLSL ES 3.00 syntax (the effect targets WebGL2).","Report the driver/GPU + log to the Remotion maintainers if using unmodified sources."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  metallicSwirl({speed: 1})(...);\n} catch (err) {\n  if (err instanceof Error && /Metallic swirl shader compile failed/.test(err.message)) {\n    // log the GLSL info log, fall back to a different effect\n    console.error(err.message);\n  } else {\n    throw err;\n  }\n}","preventionTips":["Do not modify the shipped FRAGMENT_SHADER/VERTEX_SHADER strings without validating GLSL ES 3.00 syntax.","Use a hardware-accelerated browser with current GPU drivers.","Report unmodified-source compile failures (with the info log + GPU info) to maintainers.","Keep a non-WebGL fallback effect for environments with weak drivers."],"tags":["brand","metallic-swirl","webgl","shader","gpu"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}