# The Industry's Foundation for High Performance Graphics

1. ## glBlendEquationSeparate Questions.

Heya, I must be having one of those days because I am stumped, I am trying the following...
Code :
```glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glBlendColorEXT(transp.r, transp.g, transp.b, transp.a);
glBlendFuncSeparateEXT( GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_COLOR, GL_ZERO, GL_CONSTANT_COLOR);```
I have my color channels working fine but I have been unable to get my expected results in the alpha channel. What I would expect to see is 1.0's everywhere from the glClear() except where I draw geometry where there should be transp.a?? Yet instead I get an alpha of 1.0 everywhere (no transp.a is not 1.0).

So to then simplify things I attempted...
Code :
```glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glBlendColorEXT(transp.r, transp.g, transp.b, transp.a);
glBlendFuncSeparateEXT( GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_COLOR, GL_ZERO, GL_ZERO);```
With GL_ZERO in both srcAlpha and destAlpha you would expect to get 0.0 in alpha everywhere I draw geometry (max(0.0*S, 0.0*D) = 0.0) and 1.0 everywhere else (from the clear)... yet I still get 1.0 everywhere.

The color channel however is fine, I get the expected color results.

Anyone have any ideas?

(I am using an Nvidia Quadro FX 4400 with driver 7.7.1.8)

2. ## Re: glBlendEquationSeparate Questions.

Nevermind, I got it.

GL_MAX gets you Ac = max(As, Ad) not Ac = max(As * Sa, Ad * Da).

#### Posting Permissions

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