Questions tagged [alphablending]

Alpha blending is a convex combination of a translucent foreground color with a background color allowing for transparency effects.

562 questions
13
votes
4 answers

How to use pre-multiplied during image convolution to solve alpha bleed problem?

i'm trying to apply a box blur to an transparent image, and i'm getting a "dark halo" around the edges. Jerry Huxtable has a short mention of the problem, and a very good demonstration showing the problem happen: But i, for the life of me, cannot…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
13
votes
6 answers

How to draw 32-bit alpha channel bitmaps?

I need to create a custom control to display bmp images with alpha channel. The background can be painted in different colors and the images have shadows so I need to truly "paint" the alpha channel. Does anybody know how to do it? I also want if…
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49
11
votes
1 answer

Alpha Blending in Metal Not Giving The Expected Results

I'm having trouble rendering semitransparent sprites in Metal. I have read this question, and this question, and this one, and this thread on Apple's forums, and several more, but can't quite get it to work, so please read on before marking this…
Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
11
votes
3 answers

Handling alpha channel in WPF pixel shader effect

Is there something unusual about how the alpha component is handled in a pixel shader? I have a WPF application for which my artist is giving me grayscale images to use as backgrounds, and the application colorizes those images according to the…
vanmelle
  • 1,605
  • 1
  • 14
  • 22
11
votes
1 answer

Alpha Blending 2 RGBA colors in C

Possible Duplicate: How to do alpha blend fast? What is the fastest way to alpha blend 2 RGBA (Integer) colors? As a note, the target color where to blend is always opaque, only the second color can have different levels of transparency. I am…
PerracoLabs
  • 16,449
  • 15
  • 74
  • 127
11
votes
1 answer

DirectX 11 Alpha Blending Not Working

Okay, so I have been trying to get Alpha Blending to work in my 3D application but it just doesn't want to happen. I am drawing 2d images with an orthogonal projection at the very end of the rendering loop (depth testing remains enabled) and the…
scribblesiam
  • 131
  • 1
  • 1
  • 4
10
votes
1 answer

Alpha Compositing Algorithm (Blend Modes)

I'm trying to implement blend modes from the PDF specification, for my own pleasure, in SASS. PDF Specification: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf Page 322 is the alpha compositing section. The input…
Tixz
  • 135
  • 1
  • 8
10
votes
2 answers

What would cause OpenGL alpha blending differences between Windows and OS X?

There are 3 backgrounds in the below image: black white & grey There are 3 bars on each one: black -> transparent, white -> transparent, and colors -> transparent I am using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); and all my vertex colors…
Danny Dulai
  • 1,657
  • 12
  • 14
10
votes
2 answers

How to obtain the right alpha value to perfectly blend two images?

I've been trying to blend two images. The current approach I'm taking is, I obtain the coordinates of the overlapping region of the two images, and only for the overlapping regions, I blend with a hardcoded alpha of 0.5, before adding it. SO…
10
votes
1 answer

Overlay two or more Bitmaps to show in Picturebox (C#)

In my C# program I have a Picturebox in which i want to show a stream of video (consecutive frames). I receive raw data, that I then transform into Bitmap or Image. I can show one image at a time without a problem (to reproduce the video stream).…
StinkyCat
  • 1,236
  • 1
  • 17
  • 31
9
votes
2 answers

OpenGL blending creates white border around textures

I'm trying to use OpenGL (C++) to render two textures onto a rectangle. I'm having some trouble blending the two of them though. The first image comes from a .jpg file (https://learnopengl.com/img/textures/container.jpg). This image has no alpha…
shmoo6000
  • 495
  • 4
  • 22
9
votes
2 answers

Antialiased text on transparent bitmap

I'd like to draw antialiased text on a transparent bitmap and have the antialiasing drawn as alpha blended pixels. This way, I can draw the bitmap onto any color surface (or an image, for that matter) and the antialiasing still looks fine. Here is a…
iano
  • 2,061
  • 1
  • 18
  • 22
8
votes
1 answer

Dark halo around partial transparent parts of images in opengl

I am routinely finding with OpenGL, when I am trying to draw something on a texture and then later onto another surface, using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), I invariably end up with a colored halo (usually a darkish colored…
markt1964
  • 2,638
  • 2
  • 22
  • 54
8
votes
3 answers

Libgdx 3D Texture Transparency

I'm having a problem with a texture which has transparent areas. Basically it is a texture of a coin rendered onto a cube. I can't get the corners to appear transparent, they just show up as white/gray. I made sure to enable G20.GL_Blend, so that…
univ3rse
  • 103
  • 1
  • 6
8
votes
1 answer

QML Video alpha-blending/rendering a video into a Qt Quick Scene Graph

I'm trying to get an alpha-blending effect in QML with a video in RGBA. Now the problem is that the Video Item supplied by QtMultimedia actualy opens an overlaying window in the QtQuick scene, so I don't think it's possible to alpha-blend other QML…
Mac
  • 165
  • 9
1
2
3
37 38