Questions tagged [alphablending]

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

562 questions
0
votes
1 answer

textures with transparent background by using alpha blending opengl

I have scar textures and I want to get rid of the background skin colour by using alpha blending. However, I have problems with changing the opacity of individual pixels of specific textures. What is the easiest way to have textures with transparent…
0
votes
0 answers

glBlendFunc and framebuffer object

Alpha blending is not working as expected when I draw to a framebuffer object. Specifically, calling glBlendFunc has no effect on what pixels are in the framebuffer. I check what is in the framebuffer before and after drawing using glReadPixels. The…
Little Endian
  • 784
  • 8
  • 19
0
votes
1 answer

OpengGL Light Blending

I am writing a Lights/Shadows system for my game using Java alongside the LWJGL. For each one of the Light-Emitting Entities I generate such a texture: I should warn you that these Textures are full of (0, 0, 1) or (1, 0, 0) pixels, and the…
Thiago
  • 471
  • 1
  • 7
  • 20
0
votes
1 answer

Win32 C++ Alphablend a Bitmap Partially Transparent

I've googled, seen examples, other questions here, MSDN and Downloaded Example code. I cannot figure out what is wrong with this. // setting up the memory DC and selecting in the bitmap HDC hdc = GetDC(hWnd); HDC hdcMem =…
Evan Carslake
  • 2,267
  • 15
  • 38
  • 56
0
votes
1 answer

opengl blending only working for one frame

I'm trying to darken my display by drawing a fullscreen black quad, but with only 0.5 alpha. the first frame I render, this works correctly, however after the first frame I only get a black screen. There's a lot of rendering going on, but here's…
zacaj
  • 1,987
  • 1
  • 19
  • 39
0
votes
1 answer

Alpha Blend if Background Alpha is not 255/1.0f

I am trying to do an alpha blending in c#. So my actual code for this is: final.Red = (pencil.Red * pencil.Alpha) + (background.Red * (1.0f - pencil.Alpha)); final.Green = (pencil.Green * pencil.Alpha) + (background.Green * (1.0f -…
user3000289
0
votes
0 answers

Android - OpenGL-ES-2.0 alpha blending with ZOrderOnTop

My problem is the following: I am displaying a GLSurfaceView with ZOrderOnTop set to true and with a simple Yellow background.
Sipka
  • 2,291
  • 2
  • 27
  • 30
0
votes
1 answer

How can I render back to front in opengl?

I am trying to render an transparent object in opengl but sometimes the textures are visible through each other and sometimes they are not. As far as I know I have to render them from the back to the front and it is looking fine when I do it…
Busti
  • 5,492
  • 2
  • 21
  • 34
0
votes
1 answer

C++ DirectX 9.0 Sprite Alpha Blending Not Showing

EDIT: SOLVED The problem was me using the renderstate functions I needed for alphablending outside of the Sprite->Begin() and Sprite->End() codeblock. I am creating my own 2D engine within DirectX 9.0. I am using sprites with corresponding…
0
votes
2 answers

transform single channel of BitmapData object

I have a BitmapData object with an alpha channel. I'd like to know the fastet way to offset that alpha channel in ActionScript3 (FlashPlayer10). By offsetting I mean shifting all pixels of that channel in one direction (wrapping around the image…
BuschnicK
  • 5,304
  • 8
  • 37
  • 49
0
votes
1 answer

OpenGL ES multi-texture alpha blending question

This maybe a noob question, however, I haven't been able to find a suitable answers: I have an object in OpenGL ES (in fact, an UV mapped export from Blender) and I'd like to apply two textures to it. To be precise, I have a earth-like sphere and I…
zero0cool
  • 352
  • 4
  • 11
0
votes
1 answer

How to achieve D3D output with premultiplied alpha for use with D3DImage in WPF?

We are using a D3DImage in WPF to display partly transparent 3D content rendered using Direct3D on a background which is created in WPF. So, we have something like this:
gehho
  • 9,049
  • 3
  • 45
  • 59
0
votes
1 answer

glPoint Alpha Blending issue

I am having issues alpha blending glPoints. The alpha blending works correctly when the glPoint is over the background but when a glPoint overlaps another glPoint the background color is visible rather then the underlying glPoint. // create…
user346443
  • 4,672
  • 15
  • 57
  • 80
0
votes
1 answer

Blending problems (OpenGL)

A have a question, maybe someone can help me. I am trying to make a mirror effect using OpenGL. I draw a transparent plane, a "reflected" scene cut by stencil, and an original one. But I have a completely non-transparent "wall" instead of the…
Irene
  • 27
  • 7
0
votes
1 answer

I need an SSE shuffle routine to avoid negative numbers in a parallel subtraction

I'm working on an SSE2 implementation of an RGB565/RGB555 Alpha Blend and I've run into an issue I haven't been able to wrap my head around. This is the Alpha Blend in C++: #define ALPHA_BLEND_X_W(dst, src, alpha)\ ts = src; td = dst;\ td =…