glsl-blend-soft-light
Photoshop-like "soft light" blend mode for GLSL.
# blend = require(../) void
Usage
blend(vec3 base, vec3 blend)
Blends background and foreground with an "soft light" blend mode. The algorithm for each channel is as follows:
(blend < 0.5) ? (2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend))
Contributing
See stackgl/contributing.
License
MIT. See LICENSE.md for details.