Multiple draw buffers and single write

If I have a frame buffer with 3 color attachments and the GLSL shader only write on the first attachment.
What is the expected behavior on the 2nd and 3rd attachments?
On Intel drivers, it seems to do nothing on the 2nd and 3rd whereas, on NVidia drivers, the fragment is copied from the first to the 2nd and 3rd attachments.

If a fragment is written (passes the various per-fragment tests and isn’t discarded) but the fragment shader doesn’t write to a particular output, the pixel in the corresponding colour attachment will be undefined. If a framebuffer has more attachments than the fragment shader has outputs, use glDrawBuffers or glColorMaski to statically disable writing to the unused attachments.

Always prefer glColorMaski to modifying glDrawBuffers state.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.