6 votes
Accepted

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

Use a file format that supports alpha (png), an editor that can save it with a transparent background (gimp2, photoshop, basically not paint) and make sure you load the sprite correctly
Bálint's user avatar
  • 14.9k
3 votes
Accepted

How front-to-back blending works?

I think a figured it out. I was correct about back-to-front blending. The destination color stores the already blended layers in premultiplied format, we assume that the alpha is 1. We don't care ...
racz16's user avatar
  • 151
2 votes
Accepted

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

Here is how I would have done it (I've reworked your script, tell me if you don't understand something) ...
Hellium's user avatar
  • 2,949
2 votes
Accepted

HLSL Manual Alpha Blending

Change this: ...
Martin's user avatar
  • 203
2 votes
Accepted

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

You're drawing the sprite the wrong way: ...
Charanor's user avatar
  • 7,840
2 votes
Accepted

Why does setting blend mode in Unity shader graph to Multiply create artifacts on sprite?

Lerp the colour to white in the transparent areas. Multiplying by white (1) is the same as doing nothing at all, so this mimics traditional alpha transparency. It appears that the alpha value is ...
DMGregory's user avatar
  • 134k
2 votes

Does OIT Rendering work for semi-transparent textures with opaque parts?

I found a suprisingly simple solution for my Problem. Now I don't add my Texures that have either fully transparent or opaque Pixels to the transparent mesh/buffer, but instead to the mesh for solid ...
TheBaum's user avatar
  • 43
2 votes
Accepted

Does OIT Rendering work for semi-transparent textures with opaque parts?

As documented in the link you cite: Both new methods guarantee correct coverage of background ie. they promise that the right amount of the opaque pixels behind all the transparent objects will be ...
DMGregory's user avatar
  • 134k
2 votes
Accepted

Rendering order objects with transparency?

The usual way is: Render opaque objects first Blending disabled (this does not save memory — the render target still has just as many pixels with just as many bits of colour information — but it ...
DMGregory's user avatar
  • 134k
2 votes
Accepted

C++ Additive Blending Algorithm 2d Game

If you calculate the final result as final.red = bitmap.red + viewport.red and divide by 255, then you are simply averaging them out, without taking alpha into account. The way I learned to calculate ...
Throzen's user avatar
  • 163
1 vote

Semi transparent objects show fuzzy halos when in shadow

Found the issue. Apparently the alpha was being mixed with the background color of the html body (white in my case but I did try it with other colors as well). So the fix is to add this when getting ...
jucarave's user avatar
1 vote
Accepted

Add opacity control to SoftLight blending shader

So despite my best efforts, I could not get DMGregorys answer to work, which is a shame! Nonetheless, after several more hours of searching, I finally found a solution: First I needed to upgrade my ...
Raphael's user avatar
  • 163
1 vote

Add opacity control to SoftLight blending shader

The opposite of a right answer 😆 I initially thought I had a very neat solution to this problem. Unfortunately, halfway through typing it up I realized I'd mixed up the roles of \$a\$ (already-in-...
DMGregory's user avatar
  • 134k
1 vote

"Normal" Blend Mode with OpenGL Trouble

I had the exact same problem when I wanted to render a set of overlapping framebuffer objects like layers. The problem is Open GL blending functions is linear and it works when destination background ...
Supun Gothama's user avatar
1 vote

Drawing multiple simulation ticks in a single render frame

You can draw your first tick at 100% alpha. Your second tick can be drawn at 50% alpha, so you get 50% of tick 1 showing through. Your third tick can be drawn at 33% alpha, so you get 67% of ticks 1+2 ...
DMGregory's user avatar
  • 134k
1 vote

How to perform alpha blending on saved raw argb videos(a image and a video will also work) using direct3d9 , direct3d10 or direct3d11?

https://docs.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_usage Resource Bind Options Dynamic: Input to a Stage: yes³ 3 - The resource can only be created with a single ...
Maximus Minimus's user avatar
1 vote
Accepted

Unity Shader Blend like ugui Outline

Thanks @Draco18s suggest , I think I Slove this problem , this problem is a about alpha value missing. So just choose the larget alpha. like this: ...
TimChang's user avatar
  • 144
1 vote

How to create post-processing effects in Slick2D?

slick2d shader's language is glsl so this tutorial is useful for you but anyway I want to explain that how to make explosion effect that you added in your question. 1.posterize noise texture ...
Seyed Morteza Kamali's user avatar
1 vote

How to achieve this additive blending effect in Unity shader?

I know that this topic is old and you finally found a solution but I encountered the same issue and find another solution that also works fine, so I think that it may help other people reading this ...
Valerian's user avatar
1 vote
Accepted

DX11: Alpha blending not working with textured quads

You need to set your alpha blending state according to the effect you want to achieve. In the Output Merge Stage (when you combine the objects you're drawing with the backbuffer) the blending occours ...
Liuka's user avatar
  • 585
1 vote

Show only some parts of a point cloud. OpenGl4

It sounds like you want to have points that are more than a certain distance from all other points not be drawn, right? If so, I would recommend using something like an Octree data structure to store ...
user1118321's user avatar
  • 2,632
1 vote
Accepted

HDR alpha blend

Clamp your srcAlpha between 0 and 1. Your pixels can't be more opaque than 100% or more transparent than 0% opacity.
Stephane Hockenhull's user avatar
1 vote

DirectX 11 Sprite Alpha (Invalid? + Bad Quality)

This is a rather odd setup for blend state: ...
Chuck Walbourn's user avatar
1 vote
Accepted

How to blend the surface with HTML5 canvas?

This answer assumes you are using the 2d context for the canvas, not the 3d context (aka WebGL). The 2d context for HTML5 canvas doesn't come with such neat image filtering algorithms out-of-the-box, ...
Philipp's user avatar
  • 119k
1 vote

Use an image as mask only where pixels are opaque

Well, I finally fixed this using a discard for the pixels I don't want to be tested by stencil. It is working but discard operations are not the most performant :). Depending on the user case it could ...
Notbad's user avatar
  • 1,095
1 vote

Layers in PixiJS

If you for some reason don't want to use preordered containers, then you need to sort the render list.
David's user avatar
  • 86

Only top scored, non community-wiki answers of a minimum length are eligible