{"record":{"id":"85c811ac72416d45","repo":"remotion-dev/remotion","slug":"white-balance-shader-compile-failed-log-no","errorCode":null,"errorMessage":"White balance shader compile failed: ${log ?? '(no log)'}","messagePattern":"White balance shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/white-balance.ts","lineNumber":136,"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 white balance 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`White balance shader compile failed: ${log ?? '(no log)'}`,\n\t\t);\n\t}\n\n\treturn shader;\n};\n\nconst createProgram = (gl: WebGL2RenderingContext): WebGLProgram => {\n\tconst vertexShader = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);\n\tconst fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create white balance shader program');\n\t}\n\n\tgl.attachShader(program, vertexShader);\n\tgl.attachShader(program, fragmentShader);\n\tgl.linkProgram(program);","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/white-balance.ts#L118-L154","documentation":"Thrown by compileShader() in the white balance effect when gl.getShaderParameter(shader, gl.COMPILE_STATUS) returns false. This means the GLSL ES 3.00 shader (which includes color space conversion and white balance correction functions) failed to compile on the current GPU driver. The error includes the GL driver's info log. The shader source is a static library constant, so this is a driver/GPU compatibility issue.","triggerScenarios":"Called transitively from setupWhiteBalance() at packages/effects/src/white-balance.ts:194 via createProgram(gl). Fires when the GPU driver rejects the GLSL — the white balance shader uses sRGB↔linear color space conversion functions and white balance math that may exercise driver-specific GLSL compiler bugs.","commonSituations":"Older or buggy GPU drivers with incomplete GLSL ES 3.00 support; software rasterizers (SwiftShader) in headless/CI environments with partial shader compiler support; older mobile/integrated GPUs; outdated Chrome versions with WebGL2 regressions.","solutions":["Update GPU drivers to the latest version.","For headless/server rendering, ensure the Chrome build (e.g., @remotion/renderer's bundled Chrome) is current and WebGL2-capable.","Check chrome://gpu for WebGL2 status and any denylisted features.","Try a different GPU or toggle hardware acceleration to switch between driver and SwiftShader.","Report the issue with the full info log and GPU details."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const state = setupWhiteBalance(canvas);\n} catch (e) {\n  if ((e as Error).message.startsWith('White balance shader compile failed')) {\n    console.warn('GPU driver rejected white balance shader:', (e as Error).message);\n    // fall back to a non-WebGL color correction approach\n  }\n}","preventionTips":["Keep GPU drivers and the rendering browser current.","Test WebGL2 effects in the target render environment.","Use @remotion/renderer's bundled Chrome for server-side rendering."],"tags":["webgl","gpu","shader","glsl","white-balance-effect","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}