View Full Version : blending between the layers in FS

02-01-2016, 04:18 PM
I am doing blending in FS between 2 layers. I have layers rendered in 2 spearate FBOs. Now I want to perform blend in another FBO. So i have created texture which is radial texture with center having zero with increasing values as it grows outwards with max value of 0.5. Texture has just one channel. this texture i am using for the blending and I am using mix() to do that. Now I am performing culling to avoid the draw calls at overlapping region. Now, when I blend, some of the values from outer layer will be 0 (black) due to culling and due to this I see black patch at the middle layer due to blending. Now, I cannt put condition in shader to check if the outer layer has black color as original image can have black color. What can be done in this case?