Tagged Questions

Alpha blending is the process of combining a translucent foreground color with a background color, thereby producing a new blended color.

learn more… | top users | synonyms

1
vote
1answer
39 views

Alpha blending, transparence and z-ordering

I'm making some tests with alpha blending in a projet and I don't understand something. In my tests I've done something like that and everything look good: Draw blue box first (depth test: true, ...
1
vote
0answers
92 views

How to setup a particular blend state where the alpha channel is additive?

I would like to set a blend state to be "additive" and do the following: Result.R = Source.R + Destination.R; Result.G = Source.G + Destination.G; Result.B = Source.B + Destination.B; Result.A = ...
2
votes
1answer
120 views

XNA/MonoGame/SharpDX: Pixel shader with sprite sheet

I've searched around for two days now on the internet but cannot find a solution. I've also read up on Pixel Shaders on MSDN with no luck. I'm trying to apply a simple pixel shader to a sprite batch ...
1
vote
0answers
37 views

Weird blending behavior on PowerVR SGX544MP2

On PowerVR SGX544MP2, sometimes blending behaves in a very strange way for me. Instead of blending with the actual color from the previous draw calls, it tries to blend with black: (sorry about the ...
1
vote
1answer
33 views

Only affect pixels in buffer with alpha 0

I'm working on a transition effect where I have a texture and simply draw that as a pattern to my buffer. Here is a demo, use "e" to start the effect again. This looks fine but it won't work if the ...
5
votes
1answer
168 views

“Normal” Blend Mode with OpenGL Trouble

I've been having a lot of trouble trying to get a OpenGL blend function to work as I'd expect it to with like what I'd expect (or from any sensible image editing program). As an example, I'll use ...
1
vote
1answer
537 views

iOS Sprite Kit - Blend Mode Effect

This question builds upon the following question: How can I achieve a good fire effect with alpha blending and particles? I want to achieve the visual effect of using SKBlendModeAdd on a black layer, ...
2
votes
1answer
172 views

Use different values for Depth Test and Depth Write in OpenGL

Is there a way to use something similar to PolygonOffset to make a depth test more permissive (move fragment depth towards eye) but still write the original depth value to the depth buffer? The only ...
0
votes
0answers
35 views

XNA alpha channel mask

I'm trying to highlight a portion of the screen, such that the entire screen is covered with a semi-transparent black mask but part of that mask is "cut out", kind of like it's being lit up while ...
0
votes
1answer
45 views

DepthStencilView and alphaBlendState

I have create a 2D game with directx11 and i want to use a depth buffer instead of a painter's algorithm to draw the sprites but i have a problem since i'm not really good with directx 3d programming. ...
0
votes
1answer
76 views

Jagged text + additive blend in openGL

I am having some trouble understanding how openGL blend modes work. At first I was using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) and it all looked fine except that I couldn't use any ...
3
votes
2answers
172 views

Possible to create transparency shader which doesn't stack alpha values

The image above best demonstrates what I'm trying to achieve. It's a transparent shader for objects, but wherever the objects with this shader intersect they don't add together but simply merge with ...
3
votes
1answer
168 views

Self occluding object and alpha blending

Look at the object I've rendered with my app: It's the same screen twice, above the original and below I've drawn (by hand :P) the shape of the mesh of one of plant's leaves. You can clearly see ...
1
vote
0answers
65 views

Why am I getting the wrong color with alpha blend enabled? [closed]

I can't understand the result about drawing a line. I've set source and destination blending to D3DBLEND_SRCCOLOR, but I get a black starting color from my source. What's wrong? ...
0
votes
0answers
25 views

Any chance to store bloom power in 3 channels with YCbCr color coding?

I need to store per-pixel bloom power in the final Render Target to make Tron-like effects, when even non-bright pixels can bloom. The value can easily be stored in an alpha channel without any magic ...
3
votes
2answers
198 views

Blending semi-transparent images while not stacking their alphas

In libgdx/OpenGL ES I want to render multiple semitransparent textures while keeping the alpha still semi transparent. For example If I render a 0.5 alpha circle on top of another 0.5 alpha circle, ...
3
votes
1answer
78 views

Why does my PixelShader ignore color but respond to alpha changes?

I started teaching myself some DirectX a short time ago and found something I'm confused about. For some reason, I can only get the color of the model I'm drawing to vary between black and white, ...
0
votes
0answers
166 views

JMonkey Engine. Using 2 Alpha Maps for Texture Splatting

I am trying to apply more than 3 Diffuse textures to my terrain, but ive been running into issues: A lot of the Texture loading etc is The same code over and over, so its not much to read. Ill ...
0
votes
1answer
198 views

Rendertarget and alphablending problem (Offscreen particle rendering)

Today, I have implemented soft particles by rendering them to a separate render target and blending that with the scene, which worked as expected with additive blended particles. In that case I render ...
2
votes
2answers
291 views

Batching and Z-order with Alpha blending in a 3D world

I'm working on a game in a 3D world with 2D sprites only (like Don't Starve game). (OpenGL ES2 with C++) Currently, I'm ordering elements back to front before drawing them without batch (so 1 element ...
3
votes
2answers
190 views

Colour intersection of two alpha-blended sprites

In XNA, is it possible to merge two alpha blended sprites so they look like one contiguous shape, eliminating the merge of colour at the overlap? At the moment when I try, the intersection is quite ...
0
votes
0answers
91 views

Questions about alpha blending

Consider the following code: Device->SetRenderState(D3DRS_ALPHABLENDENABLE, true); //Open alpha blending Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); //Source factor ...
2
votes
1answer
262 views

Linear filter problem with diagonal lines on adjecent tiles

I am quite new at using OpenGL/GLSL. Basically, the project I am working on is my first 'real' experience with it. I do not know whether this is relevant, but I use libgdx for my project. Currently, ...
1
vote
2answers
730 views

How AlphaBlend Blendstate works in XNA 4 when accumulighting light into a RenderTarget?

I am using a Deferred Rendering engine from Catalin Zima's tutorial: His lighting shader returns the color of the light in the rgb channels and the specular component in the alpha channel. Here is ...
3
votes
1answer
585 views

Alpha Blending performance on IOS

I've got few questions without responses about my game development, can you help me? Here is the questions: In my game when a large object appear on the screen, the GPU go to his limits, my ...
2
votes
1answer
87 views

Write colors with alphablending but don't write into the alpha channel

I am using XNA 4.0, hence DX9 and HLSL. I have a RenderTarget2D "MAIN" that I want to add semi-transparent objects "TRANS" to. I want them to blend with MAIN using the TRANS's alpha and inverseAlpha ...
6
votes
1answer
484 views

Sprite with alpha Blending in 3D world

I'm working on a game in a 3D world with elements 2D only (Like Don't starve game) for Android and IOS. Currently, I've managed "Sprite" without alpha blending, I've just put a condition in the pixel ...
2
votes
1answer
274 views

What is this alpha blending result?

I'm having an exam soon and got a problem with one alpha blending exercise: BlendState BS3 { BlendEnable[0] = TRUE; SrcBlend[0] = ONE; SrcBlendAlpha[0] = ZERO; ...
1
vote
1answer
220 views

How to set a global alpha-blending value in Direct3D 9?

Is it possible to set an alpha value globally in Direct3D 9, which modulates the pixel alpha values of every subsequent draw? I would like to let a whole scene fade in/out. I know that for example ...
2
votes
1answer
77 views

When do I need straight alpha?

I am writing some alpha-blending code, and I realized that premultiplied alpha is enough for most cases. So I thought about using only premultiplied alpha on my engine code to simplify the ...
0
votes
1answer
524 views

Simplest way to render image over top of another with another image used as mask in OpenGL?

The effect I'm looking for is to have a single large background image that is always visible (at full alpha) and then show a second image (what I call a light map or specular map) that is partially ...