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
1 answer
SpriteKit fast fullscreen vignette / lighting with alpha blending
I am making a platforming game with SpriteKit. I want to achieve the effect that only the area around the player is lit and everything else fades into darkness. Imagine something like a fake light source or a strong vignette. For testing purpose I…

snorge
- 114
- 9
0
votes
1 answer
How do I pre-calculate an alpha level from aggregated data?
The svg code below plots four points, each with a different resulting level of transparency due to overlapping points.
The data consists of a position for a circle and the number of circles that will be at that position. The demo data here also…

MattLBeck
- 5,701
- 7
- 40
- 56
0
votes
0 answers
get the original images after doing alpha blending
i have blended 2 images using alpha blending, with alpha = 0.03 because i want the second image cannot be seen. that is:
blended image = 0.97*image1+0.03*image2
i want to get the original of image 2 back but i can't. well, i can but the image is…

Z98n
- 71
- 1
- 2
- 4
0
votes
1 answer
alpha blending in webgl works not correctly
code:
gl.enable(gl.DEPTH_TEST);
gl.depthFunc(gl.LESS);
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
Problem in that on a figure "superfluous" is drawn:
how to correct it?
P.S. alpha=0.9

Анатолий Грабаров
- 38
- 10
0
votes
0 answers
How to draw a circle with Bitmap pixels?
In my app I blend 2 Bitmaps, one Bitmap is on the screen and when i Swipe with my finger it reveals the matching pixels from the second Bitmap. The way I have now works but when I touch the screen it only reveals squares from the other Bitmap since…

Jonah G
- 91
- 1
- 1
- 14
0
votes
1 answer
Transparent Shader in QGLWidget leads to transparent background (see through)
I have a QGLWidget:
GlWidget::GlWidget(QWidget *parent)
: QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
For antialiasing I resently implemented the Samplebuffer.
For some transparent meshes I used the GL_BLEND function:
void…

gap
- 1
- 5
0
votes
1 answer
How draw rounded rectangle with alpha blending in OpenGL immediate mode
I have found some code that will allow me to draw a rounded rectangle in OpenGL immediate mode (here).
What I would like to do it decrease the alpha, the further away from the centre of the rectangle - as would find under a Windows/Mac window or…

SparkyNZ
- 6,266
- 7
- 39
- 80
0
votes
1 answer
how is the default blending mode (SKBlendModeAlpha) calculated?
In SpriteKit, how is the default blending mode (SKBlendModeAlpha) calculated? Can you please verify that it works on my example points below? All nodes below use the default SKBlendModeAlpha.
My scene has a white background and two identical child…

rimsky
- 1,163
- 3
- 16
- 27
0
votes
1 answer
Libgdx blending contrast issue in render();
In a Libgdx 1.x Stage, my goal is to apply a dark semi transparent mask on my screen except an area that should display the original screen.
My global render method:
public void render() {
Gdx.gl.glClearColor(0, 0, 0, 1);
…

Don
- 977
- 3
- 10
- 28
0
votes
0 answers
OpenGL: alphablending surface with itself
In my (Android OpenGL ES-based) app, I need to render a complex, self-obstructing surface with DEPTH_TEST and BLEND enabled:
GLES20.glEnable (GLES20.GL_DEPTH_TEST);
GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA,…

Leszek
- 1,181
- 1
- 10
- 21
0
votes
1 answer
How to use opencv to acess images to use for alpha blending in java for android
for my app I need to blend two photos using an alpha mask. How do I finish the code? And how do I acess the photos using opecv?
This is the code I have until now:
public int abc()
{
double alpha;
double beta;
double input;
Mat src1;
Mat src2;
…

Jonah G
- 91
- 1
- 1
- 14
0
votes
2 answers
DirectX 9 + Shader Effect: disable a smooth transition of color
I created a simple shader effect, which must paint left-half part is blue color and right-half part is red color. But the transition is not sharp colors and is made with a gradient see picture:
I need to turn off the smooth transition of colors…

Jarikus
- 774
- 8
- 18
0
votes
1 answer
how to use alpha blending for android to blend 2 photos
For an application I need to display a photo on the screen, and over it show each frame of the photo i'm taking now through the camera. I know I need to use Alpha blending to show part of each photo for each pixel, for example: on a certain pixel…

Jonah G
- 91
- 1
- 1
- 14
0
votes
0 answers
How to set Transparent TEdit AlphaBlendValue in TEdit
I want to make transparent TEdit
I would use the function AlphaBlendValue but I can not, does anyone have any solution ?, any component that has TEdit with AlphaBlendValue?
Example:
Edit1.AlphaBlend := True;
Edit1.AlphaBlendValue := 0;

Fake
- 83
- 2
- 13
0
votes
0 answers
Compositing Transparent Polygons with OpenGL ES 2.0
I have a 2D object that needs to be rendered to the screen as semi-transparent using OpenGL ES 2.0. However, the object is is composed of several overlapping polygons. When I use the blend function
glBlendFunc(GL_SRC_ALPHA,…

timgerst
- 1