Cheatography
https://cheatography.com
This cheatsheet provides shader-friendly implementations of Photoshop's blending modes. These formulas are optimized for use in GLSL or HLSL shaders, making them suitable for real-time graphics applications.
Darken Group
Blend Mode |
Commutativity |
Formula |
Darken |
commutative |
min(Target, Blend) |
Multiply |
commutative |
Target * Blend |
Color Burn |
non-commutative |
1 - (1-Target) / Blend |
Linear Burn |
commutative |
Target + Blend - 1 |
Lighten Group
Blend Mode |
Commutativity |
Formula |
Lighten |
commutative |
max(Target, Blend) |
Screen |
commutative |
1 - (1-Target) * (1-Blend) |
Color Dodge |
non-commutative |
Target / (1-Blend) |
Linear Dodge |
commutative |
Target + Blend |
Contrast Group
Blend Mode |
Commutativity |
Formula |
Overlay |
non-commutative |
(Blend > 0.5) ? (1 – (1-Target) / (2 * (Blend - 0.5))) (Blend <= 0.5) ? (Target / (1 - 2 * Blend)) |
Soft Light |
non-commutative |
(Blend > 0.5) ? (1 - (1 - Target) * (1 - (Blend - 0.5))) (Blend <= 0.5) ? (Target * (Blend + 0.5)) |
Hard Light |
non-commutative |
(Blend > 0.5) ? (1 - (1 - Target) * (1 - 2 * (Blend - 0.5))) (Blend <= 0.5) ? (Target * (2 * Blend)) |
Vivid Light |
non-commutative |
(Blend > 0.5) ? (1 - (1 - Target) / (2 * (Blend - 0.5))) (Blend <= 0.5) ? (Target / (1 - 2 * Blend)) |
Linear Light |
non-commutative |
(Blend > 0.5) ? (Target + 2 * (Blend - 0.5)) (Blend <= 0.5) ? (Target + 2 * Blend - 1) |
Pin Light |
non-commutative |
(Blend > 0.5) ? (max(Target, 2 * (Blend - 0.5))) (Blend <= 0.5) ? (min(Target, 2 * Blend)) |
Inversion Group
Blend Mode |
Commutativity |
Formula |
Difference |
commutative |
Target - Blend |
Exclusion |
commutative |
0.5 - 2 * (Target-0.5) * (Blend-0.5) |
Additional Information
Overlay: A combination of multiply and screen. Also the same as Hard Light commuted.
Soft Light: A combination of multiply and screen (The formula is only approximate).
Hard Light: A combination of multiply and screen. Also the same as Overlay commuted.
Vivid Light: A combination of color burn and color dodge.
Linear Light: A combination of linear burn and linear dodge.
Pin Light: A combination of darken and lighten. |
|
Created By
https://x.com/artcreativecode
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets