Skip to content

BlendModes

Johannes Deml edited this page Nov 21, 2019 · 10 revisions

When taking about blending there is always a mode for the Source and Destination pixel. Source is the data from the shader, Destination is the value in the color buffer (the data that is already written in the image).

Input

Source1 Source2 Destination
Source1 Texture Source2 Texture Destination Texture

Common Blend Modes

Normal Premultiplied Additive
Resulting Texture Resulting Texture Resulting Texture
SoftAdditive Multiply 2xMultiply
Resulting Texture Resulting Texture Resulting Texture
HighContrast InvertColors Colorize
Resulting Texture Resulting Texture Resulting Texture
Colorize2 Empty Empty
Resulting Texture Empty Slot Empty Slot

Normal

SrcAlpha OneMinusSrcAlpha - Using Source1 Resulting Texture

PremultipliedAlpha

One OneMinusSrcAlpha - Using Source1 Resulting Texture

Additive

SrcAlpha One - Using Source1 Resulting Texture

SoftAdditive

OneMinusDstColor One - Using Source1 Resulting Texture

Multiply

DstColor Zero - Using Source1 Resulting Texture

2xMultiply

DstColor SrcColor - Using Source1 Resulting Texture

HighContrast

DstColor DstColor - Using Source2, control brightness through Image(script) color Resulting Texture

InvertColors

OneMinusDstColor Zero - Using Source2 Resulting Texture

Colorize

DstColor Zero - Using Source2, control color through Image(script) color Resulting Texture

Colorize2

OneMinusDstColor One - Using Source2, control color through Image(script) color

Use Alpha controls Brightness to blend the effect through the alpha value Resulting Texture

Further Links