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
0 answers

Three.js Enabling blending using non-transparent image for texture map

Experimenting with three.js and working through the NeHe demos. Number 9 loads a non-transparent JPG. The JPEG is mainly black and acts as a mask. A series of overlapped objects should blend together with only the white areas of the objects being…
0
votes
0 answers

PHP imagealphablending alternative for svg

Following is a task I have done using PHP GD. And I want to do similar thing in SVG. //Part One $img = @imagecreatetruecolor(80, 80); $red = imagecolorallocatealpha($img,255,0,0,0); $green =…
Moin
  • 26
  • 3
0
votes
1 answer

AlphaBlend and 16-bit color mode

Win32 graphics is not my gig, but I have to do some alpha blending. The following code works fine in 32-bit color mode but displays nothing except the white background in 16-bit mode. Sorry for the length, but I don't know where it's going wrong.…
chrisd
  • 853
  • 1
  • 9
  • 23
0
votes
1 answer

Volume Rendering alpha blending

I found this tutorial http://www.codeproject.com/Articles/352270/Getting-started-with-Volume-Rendering about Volume Rendering and tried to implement my own renderer. I got to the point when I can draw all slices at once with alpha testing, which…
Konrad
  • 3
  • 2
0
votes
1 answer

ARM NEON my calculation result when there are negative numbers is incorrect

I am trying to calculate the following using neon in assembly ((200*(53-255))/255) + 255 whose result should equal approx 97 I've tested here http://szeged.github.io/nevada/ and also on a dual-core Cortex-A7 ARM CPU tablet. And the result is 243…
bfalz
  • 92
  • 9
0
votes
0 answers

Can't change color with blending

I'm new with OpenGL and I'm a little stuck with the blending. I'm using java and the lwjgl. The result I want is a set of different textures with their alpha channel. I did this already and I have no problem. But then I want to add points with…
0
votes
1 answer

Saving PNG from VB.NET Messes up Shadows

I have been trying to tackle the age-old issue of .NET (all versions) not supporting TRUE transparency natively, and after reading thousands of articles, questions/answers, forums, msdn articles, etc, have come up empty handed aside from being able…
Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
0
votes
1 answer

Blend 2 Colors in Java

So I need to blend 2 colors with different alpha values. Either color can have an alpha color of 0-255. Here's the algorithm I am using now and it doesn't work. If the alpha is above 1 for either color then the whole color turns solid. On a scale of…
devCorner
  • 193
  • 4
  • 15
0
votes
1 answer

AlphaBlend generating incorrect colors

I've managed to avoid Windows GDI for decades, and now I'm paying the price. The following C++ code does not result in the correct colors. It's just supposed to white-fill a window and then alpha blend a single bitmap. All of the alpha is per-pixel…
chrisd
  • 853
  • 1
  • 9
  • 23
0
votes
0 answers

alpha channel blending issue in GLES2

I have a need where I need to have separate blending for alpha channel but its not working. Let me explain with my test. Alpha blending is enabled and I have set color and alpha write mask to true. 1) I am clearing my buffer with glClear(0,0,0,1) 2)…
madan kandula
  • 460
  • 5
  • 22
0
votes
1 answer

Partially transparent, A xor B alpha blending in cocos2d-x?

I'd like to blend two Sprites in cocos2d-x, without having these blending with the underlying Layer. From the Wikipedia article about alpha compositing, we have the following image: I'm interested in achieving the effect as displayed in the "A xor…
conciliator
  • 6,078
  • 6
  • 41
  • 66
0
votes
1 answer

Optimizing Alpha blending

I have two colors and I use this method to do a simple alpha blending: int Color::blend(int col1, int col2) { float a1 = ((col1 & 0x000000FF) / 255.0); return ((int)((((col1 & 0xFF000000) >> 24) * a1) + (((col2 & 0xFF000000) >> 24) * (1.0 -…
Sylar
  • 357
  • 1
  • 5
  • 15
0
votes
2 answers

Diffrent values of alpha for different regions of a sprite(Flex/Actionscript)

Here is my problem : I have a Sprite covering the entire screen. Other than a certain rectangle of this sprite I want the rest of the sprite to have alpha = 0.5. And for that particular rectangle, I want alpha = 0. Is it possible? How?
simplfuzz
  • 12,479
  • 24
  • 84
  • 137
0
votes
1 answer

DX11 Alpha Blend Object Draw To Render Target

My problem is: i can't draw an Alpha Blend object into render target with it's blend rightly, i have a few experience on dx9 but not in dx11 so don't know what i miss in dx11. please follow images... Any flag must be set in dx 11 when create render…
0
votes
2 answers

Shader transparancy not working with one half

glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); and used this in the fragment shader. I've used Alpha blend to get the transparency working however it only seems to work from one side. Not sure what the problem is, am new…