{"record":{"id":"4182837dd1f0158a","repo":"Comfy-Org/ComfyUI","slug":"framebuffer-is-not-complete","errorCode":null,"errorMessage":"Framebuffer is not complete","messagePattern":"Framebuffer is not complete","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_glsl.py","lineNumber":474,"sourceCode":"        # Create framebuffer with only the needed color attachments\n        fbo = gl.glGenFramebuffers(1)\n        gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, fbo)\n\n        draw_buffers = []\n        for i in range(num_outputs):\n            tex = gl.glGenTextures(1)\n            output_textures.append(tex)\n            gl.glBindTexture(gl.GL_TEXTURE_2D, tex)\n            gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA32F, width, height, 0, gl.GL_RGBA, gl.GL_FLOAT, None)\n            gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)\n            gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)\n            gl.glFramebufferTexture2D(gl.GL_FRAMEBUFFER, gl.GL_COLOR_ATTACHMENT0 + i, gl.GL_TEXTURE_2D, tex, 0)\n            draw_buffers.append(gl.GL_COLOR_ATTACHMENT0 + i)\n\n        gl.glDrawBuffers(num_outputs, draw_buffers)\n\n        if gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER) != gl.GL_FRAMEBUFFER_COMPLETE:\n            raise RuntimeError(\"Framebuffer is not complete\")\n\n        # Create ping-pong resources for multi-pass rendering\n        if num_passes > 1:\n            for _ in range(2):\n                pp_tex = gl.glGenTextures(1)\n                ping_pong_textures.append(pp_tex)\n                gl.glBindTexture(gl.GL_TEXTURE_2D, pp_tex)\n                gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA32F, width, height, 0, gl.GL_RGBA, gl.GL_FLOAT, None)\n                gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)\n                gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)\n                gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE)\n                gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)\n\n                pp_fbo = gl.glGenFramebuffers(1)\n                ping_pong_fbos.append(pp_fbo)\n                gl.glBindFramebuffer(gl.GL_FRAMEBUFFER, pp_fbo)\n                gl.glFramebufferTexture2D(gl.GL_FRAMEBUFFER, gl.GL_COLOR_ATTACHMENT0, gl.GL_TEXTURE_2D, pp_tex, 0)\n                gl.glDrawBuffers(1, [gl.GL_COLOR_ATTACHMENT0])","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_glsl.py#L456-L492","documentation":"Raised in _render_shader_batch() after attaching one RGBA32F texture per output to the FBO and calling glDrawBuffers() with all color attachments; glCheckFramebufferStatus() did not report GL_FRAMEBUFFER_COMPLETE. With MRT of float textures the two usual causes are: num_outputs exceeding GL_MAX_COLOR_ATTACHMENTS, or the driver not treating RGBA32F as color-renderable without EXT_color_buffer_float.","triggerScenarios":"A GLSL node configured with more outputs than the implementation supports (software/older drivers commonly cap at 4-8 color attachments); GLES3.0 contexts lacking EXT_color_buffer_float where rendering to GL_RGBA32F is illegal; width/height of 0.","commonSituations":"Requesting 8-16 outputs from one fragment shader on Mesa llvmpipe or embedded drivers; running on a GLES3 context where only half-float rendering is guaranteed.","solutions":["Reduce the number of outputs of the GLSL node (split the effect across two nodes/stages).","Verify EXT_color_buffer_float is present (glGetString(GL_EXTENSIONS) / the log line printed at context init); if absent, update drivers or use a GPU/driver stack that exposes it.","Confirm width and height are > 0 and within GL_MAX_TEXTURE_SIZE.","On software rendering, switch to a real GPU or accept fewer outputs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Before configuring many outputs, check the driver limit (needs a live GL context):\n# max_attachments = gl.glGetIntegerv(gl.GL_MAX_COLOR_ATTACHMENTS)\n# assert num_outputs <= max_attachments\n# assert 'EXT_color_buffer_float' in gl.glGetString(gl.GL_EXTENSIONS)\nnum_outputs = 4  # keep conservative; most drivers guarantee >= 4","typeGuard":null,"tryCatchPattern":"try:\n    out = run_glsl(...)\nexcept RuntimeError as e:\n    if \"Framebuffer is not complete\" in str(e):\n        raise ValueError(\"Reduce the node's output count or use a driver with EXT_color_buffer_float\") from e\n    raise","preventionTips":["Keep MRT output counts small (<= 4) for portability.","Confirm EXT_color_buffer_float is listed in the context init log line before relying on float outputs.","Avoid 0-sized width/height inputs."],"tags":["opengl","framebuffer","mrt","float-textures","glsl"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}