Questions tagged [alpha-blending]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
40 views

How to create post-processing effects in Slick2D?

As I get closer and closer to the end of the feature development for my game and the beginning of the graphical overhaul, I keep thinking of ideas for graphical effects that would make my game even ...
0
votes
1answer
75 views

How to get rid of the white border/background on my png image?

I am making a game using pyGame; it is basically a space invader game, with a tank. As we can see, this tank image I have has white borders / a white background, which I really want to get rid of. I ...
0
votes
1answer
94 views

HLSL Manual Alpha Blending

I'm trying to do alpha blending manually because I only want to apply alpha blending on certain pixels. Underlying is the texture I'm writing to. This is what I got so far, but it doesn't give the ...
0
votes
1answer
98 views

Howto apply alpha value (Color) to a sprite in libgdx

Howto apply alpha to a sprite so it will work. With the following code, the sprite still is completely visible. Can someone help me ? ...
0
votes
1answer
155 views

Remove background from sprite sheet after splitting

I am using libgdx to implement a Parallax background. Now I need to show some animated object over the background. I downloaded a sprite sheet(with images of objects on white background), and split it ...
0
votes
2answers
1k views

How to achieve this additive blending effect in Unity shader?

I want to achieve something like this using blending I thought that it might be a simple additive shader but after using Blend One One or Blendop Add I get something like this
0
votes
1answer
60 views

Alpha Blending older Images

I am working on re-writing an old game, and have faced some issues with the older images that were used, the first thing we done was convert all the old images and set the alpha channel on black ...
0
votes
1answer
340 views

DX11: Alpha blending not working with textured quads

A bit novice on directx11. I am rendering some textured quads out of PNG files (with alpha transparency) and get some inconsistency with my alpha blending. I have a background changing color ...
1
vote
1answer
209 views

Show only some parts of a point cloud. OpenGl4

I am developing an opengl 4.0 app which is showing a point cloud. In the other hand, I have an array "pos" where I have some x,y,z positions: ...
2
votes
0answers
31 views

Blending Lights Into An Image Pulled From Memory (2d)

The circumstances to why I am forced to do things this way are a bit weird, without going into them, I have the following situation: I have a pointer that points to image data arranged in the form ...
1
vote
1answer
278 views

How can i make fade in/out of the alpha color of a material from black to none black?

This is script is attached to a black plane. I have a plane and i added to it a material and the plane is in black. When running the game the alpha color of the plane material is changing slowly. The ...
0
votes
1answer
148 views

HDR alpha blend

How do I blend two colors using SrcAlpha and OneMinusSrcAlpha when I have HDR range (rgb and a values can be > 1)? The typical formula for non-HDR is (src * srcAlpha) + (dst * (1.0 - srcAlpha)) but ...
0
votes
1answer
185 views

DirectX 11 Sprite Alpha (Invalid? + Bad Quality)

i have a bug with a texture font. This is the texture file in photoshop: This is the result i am getting: The alpha from 0 and 1 shows weird artifacts as the final result, alongside the low quality ...
1
vote
1answer
195 views

How to blend the surface with HTML5 canvas?

I can simply blend the surface in GameMaker using these codes: ...
1
vote
0answers
27 views

Fallback for R32F alpha blending

I'm rendering an aggregation of value into an R32F format texture, using alpha blending to accomplish the sum operation. R32F alpha blending is not supported on all hardware. What kind of fallback ...
1
vote
0answers
1k views

Overlap transparent particles without blending? (Unity)

I'm trying to create a continuous output of light from an object (like the exhaust of a space ship), and I thought I'd use particles to achieve this. But I'm running into a problem with alpha blending....
0
votes
1answer
178 views

Use an image as mask only where pixels are opaque

We are into a game where to build our tile map, we carve on an image with a mask (At first the whole map is an image, and we create holes on it with tiles to create the map and le the background show. ...
2
votes
0answers
375 views

Enabling OpenGL lighting seems to disable blending

I have the following code to set up for some 2D drawing using OpenTK. I originally wrote it without any lighting considerations, but later added the lighting block. This version of the code uses ...
0
votes
1answer
636 views

Layers in PixiJS

I am using the PixiJS framework to create a 2D RPG Game. How can I create a PIXI.Container with a transparent background which I can render on top of my main stage ...
1
vote
0answers
54 views

Controllable color blending?

I'm relatively new to color blending in DirectX, and I'm hoping there is a relatively simple answer to this question. I am targeting Direct10.1. What I am trying to achieve is colour blending of two ...
1
vote
1answer
659 views

Change the alpha blending color of scaled textures

It looks like semitransparent pixels are blended with while color when textures are drawn scaled. It is very noticeable and looks ugly when textures are drawn on dark background. ...
0
votes
1answer
1k views

C++ Additive Blending Algorithm 2d Game

I was wondering if anyone could shed any light on whats going wrong with my additive blending here, I think I'm nearly there, currently my outcome is black squares. I have tried using both the formula'...
2
votes
0answers
323 views

Smoothly fitting texture tiles using alpha gradient on edges

I'm trying to draw a background texture with tiles that I'll rotate and mirror to create a maze. Here is a sample tile: As you can see, I use an alpha gradient on the borders. If I'd use a sharp ...
2
votes
1answer
76 views

Can I use a BlendState object to emulate a draw call's blending color?

I'm working on a lighting system for a tile-based game. What I want to do is draw my tiles to the screen, then draw a single Texture2D object (my light map) over top of them. However, doing it in ...
0
votes
0answers
126 views

LWJGL 3 - Random Sprites Don't Blend

Some of my sprites don't "Blend" in with tiles behind them Z-wise. glEnable(GL_DEPTH_TEST); Depth testing is enabled and works. ...
0
votes
0answers
114 views

ETC1 texture opacity

I'm using the cocos2d-x engine and want to support etc1 on android devices for my game. For ETC1 i'm using the mali compression tool, and GLSL. Everything is working, but I can't change the opacity ...
1
vote
0answers
93 views

Alpha blending is too smooth

I got the exercise to create a color map from a heightfield and given normals with alpha blending. Therefore I have to blend 4 textures (deep-flat, deep-steep, high-flat, high-steep) depending on the ...
0
votes
1answer
107 views

OpenGL Blending Format

In OpenGL, is there a format for a texture in glTexImage2D that prevents blending, or do you have to disable it using glDisable(GL_BLEND). Reason for use is that I would like to store additional data ...
3
votes
1answer
585 views

DirectX11 Equivalent of OpenGL code

I am currently porting parts of my engine over to D3D11 from OpenGL and was trying to figure out how I would accomplish the following blending functions in D3D11. ...
1
vote
1answer
79 views

Pack four alpha maps into one

I have read an article about texture splatting that says: Because the alphamap only has to be in a single channel of a texture, we can pack up to four alphamaps into a single texture – one in red,...
1
vote
1answer
1k views

Unity3D setting blend mode in shader using vertex data

I'm porting a game from iOS / Obj-C / OpenGL ES 2.0 to Unity. I have a procedural mesh script that generates a batch of quads that need to blend together to create a game board. Some of the quads ...
1
vote
0answers
585 views

DirectX 11 GenerateMips only works with premultiplied alpha?

The GenerateMips method in the ID3D11DeviceContext allows generation of mipmaps at runtime, which is fine for fully opaque textures. However, when this method is used with transparent textures that do ...
0
votes
1answer
342 views

Artefacts when drawing textures

I am working on a level-based android game. The level is constructed of many blocks, all drawn with the same texture. Until now I didn't have any problems with drawing the different textures next to ...
1
vote
1answer
2k views

Libgdx drawing semi-transparent circle on pixmap

I am currently working on an android game using libgdx and would like to add a joystick to its interface. For this I use the built-in touchpad class. Untill now I have used external images for ...
1
vote
0answers
120 views

How can I eliminate these white outlines on my sprites in libgdx?

I'm recently started working on a game in libgdx, and I've run into the problem that my sprites tend to get a thin, whitish outline around them. This is especially a problem for me since I'm working ...
1
vote
1answer
89 views

Alpha blending sometimes gives the wrong color?

I've got a method for alpha blending: ...
1
vote
2answers
535 views

libgdx texture edge blending problem

I have two completely white bitmaps here: They're there, trust me. When I put one on top of the other and scale them down with TextureFilter.Linear I get this: ...
1
vote
1answer
317 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
1answer
383 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: ...
2
votes
1answer
544 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
135 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
74 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 ...
8
votes
2answers
5k 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 ...
2
votes
1answer
2k 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 ...
2
votes
1answer
366 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
1answer
137 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
202 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
1k 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 ...
6
votes
1answer
2k 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 ...
3
votes
2answers
977 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, ...