Skip to main content

blendGlow: Luminous Light Emission

Mathematical Foundation of Glow

Glow blending is mathematically identical to reflect blending but with reversed parameter order: blendReflect(blend, base). This reversal creates luminous lighting effects where the blend layer acts as a light source illuminating the base layer.

The mathematical definition is:

Cglow=blendReflect(Cblend,Cbase)={1if Cbase=1min(Cblend21Cbase,1)otherwiseC_{glow} = \text{blendReflect}(C_{blend}, C_{base}) = \begin{cases} 1 & \text{if } C_{base} = 1 \\ \min\left(\frac{C_{blend}^2}{1 - C_{base}}, 1\right) & \text{otherwise} \end{cases}

This parameter reversal transforms the mathematical behavior, making bright blend values create intense glow effects on the base layer.

Luminous Emission Properties

PropertyDescriptionVisual Effect
Parameter ReversalBlend and base roles swappedDifferent lighting behavior
Light Source EffectBright blend creates glowLuminous emanation
Intensity AmplificationNon-linear brightness boostDramatic lighting
Selective IlluminationDarker areas remain unaffectedNatural light falloff
Live Editor
const fragment = () => {
      const base = vec3(0.05, 0.05, 0.1)
      const center = vec2(0.5)
      const dist = uv.sub(center).length()
      const hotSpot = float(0.5).smoothstep(0.05, dist)
      const warmGlow = vec3(1.0, 0.8, 0.3).mul(hotSpot)
      const result = blendGlowVec3(base, warmGlow)
      return vec4(result, 1)
}