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: Dual source blending?!

  1. #1
    Junior Member Regular Contributor
    Join Date
    May 2013

    Dual source blending?!

    What exactly is dual source blending good for?

    Is it just for specific hardware that can get some more performance then doing it in a fragment shader? Or does it actually give some functionality that can not be done via shader and single source blending?

    Seems to be a very esoteric feature. But Vulkan implements it. I was hoping somebody here can tell me more about it?!

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004

  3. #3
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003
    Quote Originally Posted by Osbios View Post
    What exactly is dual source blending good for?
    See Example Use Cases.

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2013
    I use it for sub-pixel font rendering.

    Pixel shader example:
    Code :
    #version 330 core
    uniform sampler2D tCharTex;
    uniform vec4 vCharColor;
    smooth in vec2 vTexXY;
    layout (location = 0, index = 0) out vec4 vFragColor;
    layout (location = 0, index = 1) out vec4 vFragBlend;
    void main() {
    	vFragColor = vec4(vCharColor.rgb, 1.0);
    	vFragBlend = texture(tCharTex, vTexXY) * vCharColor.aaaa;

Posting Permissions

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