blendLighten: Maximum Luminosity Selection
Mathematical Foundation of Lightening
Lighten blending implements maximum value selection between base and blend colors for each channel. This creates natural brightening effects by always choosing the lighter tone, ensuring the result is never darker than either input.
The mathematical definition is:
This component-wise maximum operation ensures that only brighter values contribute to the final result, creating natural highlight preservation without complex mathematical transformations.
Selective Brightening Properties
Property | Description | Mathematical Expression |
---|---|---|
Component Independence | Each RGB channel processed separately | |
Monotonic Brightening | Result never darker than inputs | |
Identity Preservation | Black blend leaves base unchanged | |
Symmetric Operation | Order independence |
Live Editor
const fragment = () => { const leftCircle = float(0.25).smoothstep(0.2, uv.sub(vec2(0.35, 0.5)).length()) const rightCircle = float(0.25).smoothstep(0.2, uv.sub(vec2(0.65, 0.5)).length()) const baseColor = vec3(0.8, 0.2, 0.4) const blendColor = vec3(0.3, 0.9, 0.2) const base = baseColor.mul(leftCircle) const blend = blendColor.mul(rightCircle) const result = blendLightenVec3(base, blend) return vec4(result, 1) }