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.
88
questions
1
vote
0
answers
35
views
Blending Object Colors in Unity
I'm completely new to Game Development but I'm required to use Unity for a class project. For the project I want multiple spheres of different colors to overlap each other and create new colors in the ...
0
votes
1
answer
44
views
ForwardAdd pass gets weird results when a point light is on in Unity
I'm writing a custom shader for the transparent object with built-in pipeline of Unity2022.3.9f1.
For Subshader the Tags set like below
...
0
votes
0
answers
155
views
Rendering texture as pure white / filled with color with SDL2
I added a glow or shine effect to make character flash with one color for a short period of time, it looks like this.
The code in draw function:
...
0
votes
1
answer
47
views
Semi transparent objects show fuzzy halos when in shadow
I'm having some issues when drawing a semi transparent object after an opaque object, and the object is in the shadows.
On the left, the torch is rendered just fine, I can see a nice blend of the ...
3
votes
2
answers
144
views
Add opacity control to SoftLight blending shader
Just a heads up: I have very little experience with shader languages so please excuse if this is a trivial question.
I got a SoftLight shader from this blog
(Archived here).
It blends the given sprite ...
0
votes
1
answer
791
views
How do I get Alpha/Transparency working with TGA files in Unreal?
I've got a file that needs to be TGA for technical reasons. In that file, I've got two boxes in the lower half, just right of center, that need transparency. One is for glass (upper, fully transparent)...
1
vote
1
answer
1k
views
Why does setting blend mode in Unity shader graph to Multiply create artifacts on sprite?
I want my sprite to use a blend mode based on the background (like in Adobe programs) so I set shader graph blend mode to Multiply. The blend works, but I get strange artifacts on my sprite.
In this ...
0
votes
0
answers
464
views
Unity terrain details have transparency in editor, but are on black in builds
I'm dealing with a concerning bug in my Unity build.
I have a terrain system which populates its detail layer with procedural grass textures. The textures are on transparency in the editor, as they ...
0
votes
0
answers
119
views
Read the result value of alpha blend
I am playing a bit with the shader graph (I am fairly new to shaders) but I am completely lost at the moment.
What I'd like to obtain is to somehow retrieve the alpha value after the blended operation ...
1
vote
2
answers
177
views
Does OIT Rendering work for semi-transparent textures with opaque parts?
I'm Work ing on a minecraft-like game (in OpenGL with c++) and I'm tryping to Implement Transparency for Blocks like windows, ice, leafs and water. I've tried to implement Weighted Blended Order-...
0
votes
1
answer
22
views
Math function equivalence for deferred transparency blending
if one consider the following blending operation:
color1*src_alpha blended with color2*(1-src_alpha)
Where ...
0
votes
0
answers
20
views
After drawing the scene with the deferred shader, I want to draw an object to be alpha blended, but it doesn't work
After drawing the scene with the deferred shader, I want to draw an object to be alpha blended, but it doesn't work.
This is the current drawing order
...
0
votes
1
answer
487
views
Rendering order objects with transparency?
I do not know if this question might have been asked before, but which method for rendering transparency is more efficient in terms of less lag?:
Rendering the scene from front to back with respect ...
0
votes
1
answer
40
views
Drawing multiple simulation ticks in a single render frame
I have a 2D fixed-timestep simulation (a bunch of moving sprites) that ticks several times per render frame.
I would like to render the state of each tick, so that all the ticks between render frames ...
2
votes
0
answers
62
views
OpenGL : Blending & feedback effect
I'm struggling on a simple project, as an example/sandbox, I'm rendering a small oscillating rectangle on my output. I'm not using glclearcolor() but instead, on ...
1
vote
0
answers
73
views
Blue color instead of alpha using Alpha Blending
I am testing rendering with alpha blending state according to this guide.
The aim is to add snow on terrain grass texture.
Finally, I got the wrong result -- the blue color fillings up all alpha = 0 ...
2
votes
1
answer
1k
views
How front-to-back blending works?
I would like to implement dual depth peeling in my engine. I read the original paper and examined the corresponding source code. I understand the algorithm, except how the blending works, especially ...
0
votes
1
answer
44
views
How to perform alpha blending on saved raw argb videos(a image and a video will also work) using direct3d9 , direct3d10 or direct3d11?
I'm trying to perform alpha blending on videos using direct3d11. I've wrote the code snippet below to achieve this. I've tried to read the video file out2.argb frame by frame and store it in the ...
0
votes
0
answers
36
views
Strange deviations while implementing alpha compositing
I've been trying to create my own 2d renderer for my game (for learning purposes) and I'm trying to implement alpha compositing. The formula I'm using is very trivial, which is ...
2
votes
0
answers
213
views
How to apply a color transform to textures when using pre-multiplied alpha?
I'm trying to apply a color map to my textures. The map is a 4x4 matrix that adjusts the contribution of each RGBA channel returned from the fragment shader. My texture needs to use pre-multiplied ...
0
votes
1
answer
96
views
Transparency fog performance
Old games use Distance Fog to limit the draw distance and decrease the number of polygons drawn.
This is usually done by lerping the color to the fog color.
But what if this color is full ...
0
votes
1
answer
121
views
Unity Shader Blend like ugui Outline
Unity UGUI Outline it create fourfold vertexs, So I wirte shader to optimization ( vertex only create once ),
And I want to Keep one pass . (one drawcall)
There ...
2
votes
1
answer
682
views
Additive Blending and Gamma Correction
Should one do additive blending (aka lightmapping) in linear space?
I tried doing it in linear space, and it became, well, linear and bland, losing that cool HDR-style bloomy effect. Is there some ...
0
votes
0
answers
119
views
Part of the back side of a transparent object disappears
I did some blending and culling to get the image below.
As you can see, it is messed up. On the right side of the image, only the front side of the mesh shows. On the left side of this image, it ...
0
votes
1
answer
627
views
Alpha Blending in Software with Gamma Correction
How does one efficiently implement alpha blending, without botching gamma?
Alpha blending is basically the following expression:
...
1
vote
1
answer
296
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
1
answer
2k
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
1
answer
3k
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 ...
1
vote
1
answer
2k
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
1
answer
523
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
3
answers
3k
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
2
answers
200
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
1
answer
1k
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
1
answer
374
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:
...
3
votes
0
answers
36
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
1
answer
2k
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
1
answer
332
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
1
answer
485
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
1
answer
320
views
How to blend the surface with HTML5 canvas?
I can simply blend the surface in GameMaker using these codes:
...
1
vote
0
answers
42
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 ...
4
votes
0
answers
3k
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
1
answer
215
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. ...
3
votes
0
answers
615
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
1
answer
996
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
0
answers
69
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
1
answer
1k
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
1
answer
2k
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'...
3
votes
0
answers
438
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
1
answer
108
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
0
answers
170
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.
...