Last active
July 29, 2025 23:21
-
-
Save Vavassor/81b98fa62352018894c1a0acb190f7f3 to your computer and use it in GitHub Desktop.
Photoshop blend modes in Unity ShaderLab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Photoshop blend modes in Unity ShaderLab | |
| About Blend Modes | |
| https://docs.unity3d.com/6000.0/Documentation/Manual/SL-Blend.html | |
| The following modes are used for combining the output of a shader to the framebuffer. (the screen, basically) If you wish to blend colors within a shader, instead see this article "Photoshop Blend Modes in HLSL" by Ryan Juckett. https://www.ryanjuckett.com/photoshop-blend-modes-in-hlsl/ | |
| // Additive (aka Linear Dodge) | |
| Blend One One | |
| // Darken | |
| BlendOp Min | |
| Blend One One | |
| // Lighten | |
| BlendOp Max | |
| Blend One One | |
| // Linear Burn | |
| BlendOp RevSub | |
| Blend One One | |
| // Multiply | |
| Blend DstColor OneMinusSrcAlpha | |
| // 2x Multiply | |
| Blend DstColor SrcColor | |
| // Premultiplied transparency | |
| Blend One OneMinusSrcAlpha | |
| // Soft additive (sorta like photoshop "Screen") | |
| Blend OneMinusDstColor One | |
| // Subtract | |
| Blend SrcAlpha One | |
| BlendOp RevSub | |
| // Traditional transparency | |
| Blend SrcAlpha OneMinusSrcAlpha |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment