メインコンテンツまでスキップ

blendColorDodge: Luminous Highlight Enhancement

Mathematical Foundation of Color Dodge

Color dodge creates brilliant highlight effects by dividing the base color by the inverted blend color. This mathematical approach amplifies luminosity while creating ethereal glow effects reminiscent of photographic overexposure.

The mathematical definition is:

Cresult={1if Cblend=1min(Cbase1Cblend,1)otherwiseC_{result} = \begin{cases} 1 & \text{if } C_{blend} = 1 \\ \min\left(\frac{C_{base}}{1 - C_{blend}}, 1\right) & \text{otherwise} \end{cases}

The division operation creates non-linear brightening that becomes more pronounced as blend values approach one, generating luminous regions with preserved shadow detail.

Luminosity Enhancement Properties

PropertyDescriptionVisual Effect
Highlight AmplificationBright areas become brilliantly luminousEthereal glow effects
Shadow PreservationDark areas maintain detail structureSelective brightening
Contrast InversionReverses burn effect behaviorPhotographic overexposure
Saturation ProtectionPrevents color clippingStable computation
ライブエディター
const fragment = () => {
      const center = vec2(0.5)
      const dist = uv.sub(center).length()
      const base = vec3(0.2, 0.3, 0.6).mul(
              float(0.5).smoothstep(0.2, dist)
      )
      const lightSpot = float(0.3).smoothstep(0.1, uv.sub(vec2(0.7, 0.3)).length())
      const gradient = uv.x.mul(0.5)
      const dodge = vec3(lightSpot, gradient, lightSpot.mul(gradient))
      const result = blendColorDodgeVec3(base, dodge)
      return vec4(result, 1)
}