Alpha blending is a convex combination of a translucent foreground color with a background color allowing for transparency effects.
Questions tagged [alphablending]
562 questions
0
votes
0 answers
GLSL fragment shader not handling alpha channel
I am trying to make a few simple gradient fragment shaders for a program. Nothing fancy just specify a start and stop color and interpolate between the two. Everything seem to work fine except for the alpha channel. It seems like unless the color is…

cHorse
- 11
- 1
- 8
0
votes
1 answer
How do you make the background of a texture transparent when it overlaps?
I have a texture that has a black background which I want to make transparent. The problem is that when I draw this texture in front of another object using the texture, the black background still shows. How do I make my texture transparent, even…

Brent
- 101
- 1
- 1
- 3
0
votes
1 answer
Depth test with two transparent images causes strange artifacts
I am rendering a bush composed of two same images crossed as you can see on the image underneath :
But when we turn around the bush, on of the two images has visibly big problems with it's depth test :
I tried disabling the depth test but it was…

Louis de Bussac
- 27
- 11
0
votes
0 answers
HLSL alphablending in geometry shader
I am rather new to HLSL and I am struggling with implementing a grass shader.
In the geometry shader I create quads which will display the grass blades. However when I try blending in the pixelshader things get weird. Sometimes it ignores everything…

Quinten Henry
- 125
- 1
- 2
- 10
0
votes
1 answer
Java Equivalent OpenCV Code to this C++ Code
Can anybody tell me the correct java code for this c++ code snippet:
output.at(x, y) = target.at(dx, dy);
I have tried this java code and they are displacing pixel but not showing image clearly :
output.put(x, y, target.get(dx, dy));

Udaib Khan
- 1
- 7
0
votes
2 answers
Prevent a unit to be automatically added to the Uses clause?
I am using TJvTransparentForm (from Project JEDI) on one of my forms. I am also using AlphaControls for my entire project. The problem is, TJvTransparentForm does not work well with the unit "acPNG" from AlphaControls. I need to use the regular PNG…

Jeff
- 12,085
- 12
- 82
- 152
0
votes
1 answer
Blending several fragment shaders in THREE.js to obtain one THREE.ShaderMaterial
I have a question about blending several fragment shaders in THREE.js
Here I present a code for mixing one shader with different parameters, but I also need to mix different shaders.
My shader:
uniform vec3 color;
varying vec2 vUv;
void main()…

zlon
- 812
- 8
- 24
0
votes
2 answers
Blend alpha color using bitwise operations
I have code below to blend alpha color in ARGB format:
a, b, o are integers, but should always fall in [0x00ffffff,0xffffffff]
o = ( ( ( a >> 24 ) * ( b >> 24 ) ) >> 8 ) << 24;
Is there anyway to optimize it?
Thanks!

echo
- 789
- 2
- 12
- 21
0
votes
1 answer
With Metal (vs OpenGL), How does color/alpha blending work on single-channel render targets?
I'm porting some OpenGL code from a technical paper to use with Metal. In it, they use a render target with only one channel - a 16-bit float buffer. But then they set blending operations on it like this:
glBlendFunci(1, GL_ZERO,…

bsabiston
- 721
- 6
- 22
0
votes
0 answers
overlapping alpha blending on spans
I'm right now trying to create a web page that has some text appearing over some images. I have a few elements that have a background with an alpha channel. I'm having an issue when the the goes multi-line. I'd like for the…

Benjamin
- 1,223
- 1
- 13
- 22
0
votes
0 answers
2-D alpha map examples for blending two overlayed images in MATLAB
I would like to blend two images, one is smaller and is completely enclosed by the larger one, Assume the both are rectangular. I would like to blend these two so that there is a smooth transition in a rectangular band around the smaller image. I am…

TJ1
- 7,578
- 19
- 76
- 119
0
votes
1 answer
Should the Output RGB be Divided by Output Alpha in the Non-premultiplied Alpha Blending Equation?
In alpha compositing wiki, I see the blending equation is like this (no pre-multiplying):
But in this slides, the equation is like this:
In the first equation, outRGB is divided by outAlpha.
What does it mean? Which one is the correct equation?

K.Miao
- 811
- 7
- 21
0
votes
0 answers
Subtracting a mat from scalar value
Im trying to do alpha blending as in learnopencv
//Load the bitmap
foregroundBitmap = BitmapFactory.decodeResource(getApplicationContext().getResources(),
R.drawable.dominant);
backgroundBitmap =…
user3600801
0
votes
1 answer
How can I increase the size of my Alpha mask in Python / PyGame?
I am creating a 2D dungeon crawler using Pygame, and I want to use the main character as a light source (so you can only see a small amount of the dungeon around you). I have created an alpha mask, but no matter how big I make my alpha mask, it…

Jayce
- 539
- 6
- 21
0
votes
0 answers
Blending white colors in images
I need to modify any image to get these results:
White color has to be the color I specify, I don't want to keep source image's lightness.
Rest of colors have to be tinted similar to Photoshop's "Color" layer blend mode. That is, I need them to…

AppsDev
- 12,319
- 23
- 93
- 186