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

Blending issue porting from OpenGLES 1.0 to 2.0 (iOS)

I'm porting a very simple piece of code from OpenGLES 1.0 to OpenGLES 2.0. In the original version, I have blending enabled with glEnable(GL_BLEND); glBlendEquation(GL_FUNC_ADD); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); I'm using the same code…
0
votes
1 answer

Create an alpha mask (glBlendFunc does what now?)

I am trying to render a square border (variable thickness so lines won't work). I was thinking 4 quads would do the trick (all the same size, just rotated and translated for each side). Then I thought, 2 quads should do it- Draw one then draw a…
Chemistpp
  • 2,006
  • 2
  • 28
  • 48
0
votes
2 answers

Blend formula for GDI+

I have a color A that I'd like to transform into color C, by using color B. So I'd like to know the blending formula F in GDI+, where F = F(A, B) = C. A is the "bottom color" and B is an overlay color above A, which together with A yields…
rtn
  • 127,556
  • 20
  • 111
  • 121
0
votes
1 answer

Rendering multiple overlapping non-opaque textures to a framebuffer

I'm trying to render a set of textured geometry to a single FBO, and then render that FBO to the scene. The problem is that overlapping semi-transparent areas of that geometry are not rendered correctly. They end up too opaque and dark. If I render…
0
votes
1 answer

How to set blend function on opengl for two overlapping objects

Hi I needed to draw a round corner rectangle. I followed the procedure of the above image. I first drew the green rectangle. Then I drew the two black rectangles.And then I drew circles on the edges to make the corner round. Now what I get after…
Tahlil
  • 2,680
  • 6
  • 43
  • 84
0
votes
0 answers

Drawing with high precision alpha blending

I need to blend together about 1 million semi-transparent rectangles, while being able to manage transparency accuracy by increment of 1e-6. Typically, if my 1 millions rectangle would be drawn on top of each other, I want to have a resulting alpha…
skadge
  • 121
  • 7
0
votes
2 answers

Color-keying image not working in PHP

The input image has a magenta background. The outputted image always has a black background. Both attempts give same results. I want it to be alpha background, not black background. Attempt #1: imagesavealpha($image,…
Mike Weir
  • 3,094
  • 1
  • 30
  • 46
0
votes
1 answer

GPU Texture Splatting

Just as a quick example, I'm trying to do the following: + + = With the third image as an alpha map, how could this be implemented in a DX9-compatible pixel shader to "blend" between the first two images, creating an effect similar to the…
RectangleEquals
  • 1,825
  • 2
  • 25
  • 44
0
votes
2 answers

Change Sprite alpha previously changed by AlphaModifiers

I'm running AlphaModifier on a Sprite mSprite.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); mSprite.registerEntityModifier(new AlphaModifier(.5f,1,0.4f)); After that i want to cahnge alpha of mSprite to 1 again. i tried :…
0
votes
1 answer

XNA 4 C# - Not Alpha Blending to Black

I'm trying to have my Splash Screen fade into black. I realized it fades into whatever color the screen is cleared with in the default line GraphicsDevice.Clear(Color.White); in the default update method. When I make it white, my image fades into…
freemann098
  • 284
  • 1
  • 7
  • 22
0
votes
1 answer

XNA Alpha Blending With Primitives and Sprites

I've been using XNA for awhile now and I really enjoy using its interface. Right now we're trying to make a "fog of war" system. We're making an RTS and we're basically trying to obscure the map. Units on the map have influence, and show what's…
Ares513
  • 13
  • 2
0
votes
1 answer

Blending problems using opengl (via lwjgl) when using a png texture

I have a (hopefully) small problem when using blending in OpenGL. Currently I use LWJGL and Slick-Util to load the Texture. The texture itself is a 2048x2048 png graphic, in which I store tiles of a size of 128x128 so that I have 16 sprites per…
Kisaro
  • 281
  • 1
  • 6
0
votes
1 answer

How to draw with replacement instead of blending

I'm trying to "draw" areas of transparency onto a bitmap -- like cutting holes in the image. The following code does not draw a line of transparency because drawing a transparent line onto a bitmap of course blends instead of replaces. (Why the…
AppFzx
  • 1,445
  • 2
  • 14
  • 23
0
votes
1 answer

Flash blending movie clip with HTML

Is there a way of having a Flash movie blend into the HTML below it. Like having a flash file with blend mode "Darken" be applied to the content below? I had a quick look at CSS blend-mode but either I can't figure it out or it doesn't work. Thanks.
Stefan Dunn
  • 5,363
  • 7
  • 48
  • 84
0
votes
2 answers

Windows 8 Store App DirectX 11.1 Enabling Blendstate with loaded PNG texture with alpha

I am loading a PNG with transparency to a texture with the following code: ComPtr stream; ComPtr bitmapDecoder; ComPtr bitmapFrame; ComPtr formatConverter; unsigned int…
OzBarry
  • 1,098
  • 1
  • 17
  • 44