Questions tagged [blending]

18 questions
4
votes
1 answer

Alpha blending between two overlapping semi-transparent shapes

I am working on a 2D lighting system for my game. My approach has been to: Create a transparency quad representing 'darkness'. Create a stencil shader for light sources to clip from the darkness quad. Create a shader that blends alpha from 0 ->…
Alex
  • 141
  • 1
  • 3
3
votes
1 answer

Repeating alpha over/under operation multiple times

I have two RGBA colors in linear [0..1] space, src and dst and I want to alpha blender src over/under dst n times. Of course, I could call the respective operation n times using the result from the previous one (which is what I am currently doing),…
piegames
  • 297
  • 1
  • 9
3
votes
1 answer

Alpha blending in linear colour space

I've been making a simple game in OpenGL, and implemented a screen fade-out using the old 'draw a black fullscreen quad and ramp up the alpha' trick. I'm doing all my shaders in linear space and using GL_FRAMEBUFFER_SRGB to automatically apply…
russ
  • 2,332
  • 8
  • 17
3
votes
1 answer

Can't make blending work

I have a 3 dimensional dataset where each value of the dataset is normalized to [0, 1]. I want to visualize this dataset by using texture, and blending. However, it seems that I can't make it work. Here is what I have done so far: int main(){ …
Sayan Pal
  • 263
  • 1
  • 8
2
votes
2 answers

How to perform additive blending in Metal. What do these terms mean?

Forgive me, I dont really understand the basis of alpha blending. Like I know the formula but when it comes to the terms blending operation, source blend factor, and destination blend factor I am absolutely lost. The goal is to do additive blending…
J.Doe
  • 1,445
  • 11
  • 22
1
vote
2 answers

How to calculate interpolation between multiple skeleton poses?

I found out that I should use spherical linear interpolation to blend two poses of a joint. I cannot find what to do if I have hundreds of poses to blend except applying the SLERP iteratively. What are the default methods to interpolate between…
Charlie
  • 161
  • 5
1
vote
1 answer

GL_SAMPLE_ALPHA_TO_COVERAGE and depth testing

I am currently looking into alternatives to my current, somewhat slow but exact, OIT approach. Specifically, GL_SAMPLE_ALPHA_TO_COVERAGE to convert the alpha value into a per-sample mask. // draw opaque…
Joe
  • 113
  • 5
1
vote
1 answer

How to blend a segment of an image with another image

I want to put a segment of an image to another image. But to make it realistic I applied poisson blending. But the output is not good at all. Output without poisson blending. The kid was cropped from another image. With poisson blending I have no…
Tahlil
  • 81
  • 6
1
vote
0 answers

Sorting my geometry for alpha testing

Here is my predicament. I am trying to draw a multitude of dots that leave trails behind them real time. Heres the difficulty, that line fades. Each dot line has a defined z position and the goal would be for everything to blend properly, in real…
J.Doe
  • 1,445
  • 11
  • 22
1
vote
2 answers

What blend mode is this?

I asked this on Graphic Design but was unable to get any relevant help from them. I'm trying to reverse engineer a blending mode I've seen on a picture: This image was created by someone else using Adobe's Scene7 during a Displacement Map Filter…
karlphillip
  • 111
  • 4
1
vote
1 answer

Is it possible to override or disable blending per pixel

I'm rendering transparent objects in separate framebuffer then compositing it with opaque one to get final image. The transparent pass has additive blending: glBlendFunci(0, GL_ONE, GL_ONE); so transpareny seems work perfect (I used weighted,…
recp
  • 185
  • 9
1
vote
1 answer

Given a composited image, is it possible to find the color and opacity of an overlaid shape?

I have an image that I'm trying to recreate programatically using Pyx in Python. It seems that there's an overlaid circle covering the color wheel. I'm trying to see if there's a way to, given the starting and composited RGB values for each of the 8…
Mark LeMoine
  • 111
  • 1
0
votes
1 answer

Make Object created in a list blend in/dissolve out of a scene

I have a number of (opaque) objects created using the glGenLists() glNewList() utilities. As generated, the Alpha values are all set to 1 Is there a way to make these objects when summoned blend into the scene (sort of as if they were being…
0
votes
0 answers

Blending OGRE animations, how do they do it?

Im trying to build animations for main character for open source game Rigs of Rods. The game is driven by OGRE engine.So I downloaded they mascot Simbad and inspected it and I noticed that he has splitted animations for example it has animations for…
0
votes
0 answers

How do overlay multiple textures on a noise generated height map?

I am trying to implement a planet generating shader. I use simplex noise to generate a 3D noise on my sphere giving values between 0 and 1. I have 4 textures that I want to apply based on ranges from 0 to 1 to determine when the given texture should…
wduk
  • 177
  • 6
1
2