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
Correct way to erase for paint blending with intermediate framebuffers
My scene is composed of layers that render to framebuffers. Within the framebuffers, elements are drawn back to front and are blended with ColorWithAlpha or EraseWithAlpha. Framebuffers are blended with the corresponding *WithPremultipliedAlpha…

user1832287
- 329
- 3
- 11
0
votes
1 answer
How to add a mask on an image blurring their intersection?
I have a mask and a background image. I want to add this mask on the background image and blurring (or perhaps something like cv2.inpaint()) the intersection to make it more natural, but am blocked for the bluring effect, any help would be highly…

miki
- 639
- 2
- 6
- 16
0
votes
1 answer
Transparency on certain objects only?
I have managed to get a transparent cube using
glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
and in shader.frag:
gl_FragColor = vec4(texture2D(TextureMap_uniform, uv).xyz,0.5);
but now I would like…

Weaver
- 145
- 8
0
votes
0 answers
Are there any other ways to change Image opacity in Java than AlphaComposite?
I am making a Java2D game, and I'm trying to alpha-blend layers of the same image to create something similar to blur.
Using AlphaComposite is really slow, and it's dropping the average framerate from 170 to 90, this might not look like a problem…

Locked
- 51
- 8
0
votes
1 answer
How to use blending with transparent textures and transparent color?
I'm using OpenGL ES 3. I want to draw transparent images. Some pixels of the image may have transparency from 0% to 100%. I also want to be able to set an argb value to change the whole image's color and transparency.
I have ended up with the…

Snaketec
- 471
- 2
- 14
0
votes
0 answers
How is this Alpha Blending equation to understand?
So I was reading a Document about Displacement Mappings and Surface Blendings and came across this equation which is supposed to be a Alpha-Blending equation:
while v1,...,vn are supposed to be the value vector and w1,....,wn the weight vector (is…

JinseiNagai
- 351
- 1
- 2
- 10
0
votes
1 answer
glBlendFuncSeparate crashes on OpenGL1.1 on iOS
I'm trying to build code on an older iOS devices that have arm6 processors and support for only OpenGL ES 1.1. The function glBlendFuncSeparate crashes. I found this post on stackoverflow -
iPhone OpenGL ES missing functions should be there -…

alk3ovation
- 1,202
- 11
- 15
0
votes
1 answer
How to blend 2 transparency layers?
For example we have 2 transparency layers: first is black (0, 0, 0, 0.75) and second is white (255, 255, 255, 0.64). I don't know how to blend them.
But I know how to blend one opaque and one transparent layers. It's look like this:…

MaximPro
- 563
- 8
- 21
0
votes
0 answers
Why do I get this rendering problem when I enable blending?
I want to render a cube on a transparent background. I did enable blending for this and tryed to set alpha 0 for background. The window background is transparent. If the window background would be black (the black color is not from the windows…

warriorforce
- 41
- 8
0
votes
1 answer
OpenCV Cuda alphaComp, blending a 0 image repeatedly makes it darker
I am experiencing strange behavior with alpha compositing using OpenCV 3.4.1 and Cuda.
When I blend an all-black image with an all-zero alpha channel to another image, and repeat this process recursively, the image becomes darker, settling at around…

Florian Segginger
- 460
- 3
- 9
0
votes
1 answer
GL_BLEND - Change which channel is used as Alpha
If I have a Renderbuffer that uses a color format without alpha, for example GL_RG8, how can I tell the alpha blender to use the green channel for alpha? This can be done in textures using a swizzle mask, but as renderbuffers don't support those,…

Fuzzyzilla
- 356
- 4
- 15
0
votes
2 answers
OpenGL Blending problem with transparent skybox + transparent heightmap
Here's my problem.
I'm rendering an orthogonal quad (filling the viewport) before everything (with vertex coloring at each corner), right after I'm rendering a cube skybox with 6 transparent polygons (GL_BLEND, source GL_ONE, dest GL_ONE). That…

dimcaron144
- 1
- 1
0
votes
1 answer
Visible gradient/tiered blending in many overlapping particles
I have a particle system for creating "nebulas" in a 2D space game. The results are looking pretty good, except there's a rendering/shader issue with what I'm doing. In game I see a rather ugly tiered blending, almost like I'm looking at 6-bit color…

Semimono
- 664
- 1
- 6
- 14
0
votes
1 answer
Unity3d mobile shader transparency issue
My 3D object is overlapping itself with alpha when using a custom shader in Unity3D (Unlit version):
It should look something like this instead:
Shader "Custom/Shader1" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
…

kkl
- 153
- 2
- 12
0
votes
2 answers
How to make existing app windows transparent in smartphones?
I am trying to find out if there is a way to make existing app windows transparent in a smartphone. The platform could be any of iphone/android/WP7. In my own apps, I can make use of the alpha blending features and control transparency, but is there…

Aakar
- 21
- 1