Skip to main content

blendVividLight: Extreme Contrast Illumination

Dramatic Light and Shadow Dynamics

Vivid Light blending creates extreme contrast through conditional brightness manipulation. This function combines color burn for dark regions and color dodge for light regions, generating dramatic illumination effects that amplify both shadows and highlights.

The mathematical definition uses a threshold-based approach:

Cresult={colorBurn(Cbase,2Cblend)if Cblend<0.5colorDodge(Cbase,2(Cblend0.5))if Cblend0.5C_{result} = \begin{cases} \text{colorBurn}(C_{base}, 2 \cdot C_{blend}) & \text{if } C_{blend} < 0.5 \\ \text{colorDodge}(C_{base}, 2 \cdot (C_{blend} - 0.5)) & \text{if } C_{blend} \geq 0.5 \end{cases}

This dual-mode operation creates powerful contrast effects where midtones become decision points between burning shadows and dodging highlights.

Threshold-Based Contrast Properties

PropertyDescriptionMathematical Expression
Burn ThresholdDark values undergo color burn intensificationCblend<0.5burnC_{blend} < 0.5 \rightarrow \text{burn}
Dodge ThresholdLight values undergo color dodge enhancementCblend0.5dodgeC_{blend} \geq 0.5 \rightarrow \text{dodge}
Dual ScalingBoth modes use 2x scaling for dramatic effectscale=2Cblend\text{scale} = 2 \cdot C_{blend}
Extreme ResponseCreates maximum contrast between light and darkΔCmax\Delta C_{max}
Live Editor
const fragment = () => {
      const center = vec2(0.5)
      const radius = uv.sub(center).length()
      const basePattern = radius.mul(12).cos().mul(0.3).add(0.5)
      const blendGradient = radius.mul(1.5)
      const baseColor = vec3(0.8, 0.4, 0.2)
      const blendColor = vec3(blendGradient)
      const result = blendVividLightVec3(baseColor.mul(basePattern), blendColor)
      return vec4(result, 1)
}