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?
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.
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.
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.
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.
What is wrong with kCGBlendModePlusLighter
?
From the linked document:
R = MIN(1, S + D)
So that is an additive blending capped at 1.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With