Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: alpha blending of multiple render targets

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2011

    alpha blending of multiple render targets


    I use Multiple Render Targets to render my Framebuffer and my Pickingbuffer at the same time. Now I want to implement alpha blending in the Framebuffer. The problem is, when I activate the colors in the pickingbuffer are also use alpha blending and so i cannot identify the picked triangle (i'm using color picking)

    Is it possible to activate alpha blending for one framebuffer and deactivate it for another. I know that this is possible with DirectX 10.1


  2. #2
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009

    Re: alpha blending of multiple render targets

    You can, but you need the GL_ARB_draw_buffers_blend extension to do so (also part of OpenGL 4.0).

  3. #3
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003

    Re: alpha blending of multiple render targets

    Actually you only need EXT_draw_buffers2 which is available on much more (circa 2006) hardware than ARB_draw_buffers_blend.

  4. #4
    Senior Member OpenGL Lord
    Join Date
    May 2009

    Re: alpha blending of multiple render targets

    Good catch.

    Actually, don't bother with the extension; it's a core feature of GL 3.3. glEnablei(GL_BLEND, X), where X is the draw buffer you want to enable blending for.

    All buffers with enabled blending will use the same blend parameters, but you can enable or disable blending individually.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts