Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Additive blending with Core Graphics

How can I blend two images in additive blending mode with Core Graphics?

The enum does not have something like a kCGBlendModeAdd: http://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/doc/c_ref/CGBlendMode

Any solution?

like image 991
ySgPjx Avatar asked Nov 21 '11 19:11

ySgPjx


People also ask

What is additive blending?

Additive blending is the type of blending we do when we add different colors together and add the result. This is the way that our vision works together with light and this is how we can perceive millions of different colors on our monitors — they are really just blending three different primary colors together.

What is blending in computer graphics?

Blending is the stage of OpenGL rendering pipeline that takes the fragment color outputs from the Fragment Shader and combines them with the colors in the color buffers that these outputs map to. Blending parameters can allow the source and destination colors for each output to be combined in various ways.

What is the function of blending mode?

A blending mode is an effect you can add to a layer to change how the colors blend with colors on lower layers. You can change the look of your illustration simply by changing the blending modes.

What does blending mode mean in Photoshop?

This Blending Mode looks at the color information in each channel and brightens the base color to reflect the blend color by increasing the brightness. Blending with black produces no change.


1 Answers

What is wrong with kCGBlendModePlusLighter?

From the linked document:

R = MIN(1, S + D)

So that is an additive blending capped at 1.0.

like image 61
Till Avatar answered Sep 24 '22 01:09

Till