{"record":{"id":"f462d2ef73685287","repo":"remotion-dev/remotion","slug":"shader-compile-failed-log-no-log-f462d2","errorCode":null,"errorMessage":"Shader compile failed: ${log ?? '(no log)'}","messagePattern":"Shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/mirror/mirror-runtime.ts","lineNumber":37,"sourceCode":"\t};\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(`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":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/mirror/mirror-runtime.ts#L19-L55","documentation":"The mirror effect's GLSL shader source (MIRROR_VS or MIRROR_FS) failed to compile on the target GPU. The error message includes the GLSL compiler log from gl.getShaderInfoLog(). This almost always indicates a GPU driver incompatibility or a bug in the shader source shipped with @remotion/effects — not a user parameter error, since the shader source is static within the library.","triggerScenarios":"During setupMirror, gl.compileShader runs on MIRROR_VS or MIRROR_FS and gl.getShaderParameter(shader, gl.COMPILE_STATUS) returns false. The GLSL compiler rejected the shader, and the info log is included in the message.","commonSituations":"GPU drivers that don't fully support WebGL2 GLSL ES 3.00 (#version 300 es); outdated or buggy GPU drivers; software rasterizers with incomplete shader compilers; running on very old GPU hardware. This is rarely caused by user input.","solutions":["Report the issue to the Remotion team with the full shader compile log and your GPU/driver details — the shader source is library-controlled.","Update your GPU drivers to the latest version.","Switch to a software renderer (SwiftShader) or a different GPU to work around driver bugs.","On CI, ensure the headless Chrome build includes WebGL2 shader support."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Shader compile failures are library/driver bugs — catch and report\ntry {\n  // render with mirror effect\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Shader compile failed')) {\n    // Report the GLSL log to your monitoring/Remotion team\n    console.error('Mirror shader compile failed:', e.message);\n    // Fallback: render without the effect\n  } else {\n    throw e;\n  }\n}","preventionTips":["Keep GPU drivers updated in render environments.","Test effects on the target GPU before deploying to production rendering pipelines.","Report shader compile logs to the Remotion team so library-level shader bugs can be fixed."],"tags":["webgl","gpu","glsl","shader","mirror-effect","driver-compat"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}