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

blendPinLight: Bipolar Processing Switch

Threshold-Based Dual Mode System

PinLight blending operates as a threshold-activated processing switch, applying darken mode below 0.5 and lighten mode above. This creates a bipolar system where the midpoint serves as a computational watershed.

Cresult={darken(Cbase,2Cblend)if Cblend<0.5lighten(Cbase,2(Cblend0.5))if Cblend0.5C_{result} = \begin{cases} \text{darken}(C_{base}, 2 \cdot C_{blend}) & \text{if } C_{blend} < 0.5 \\ \text{lighten}(C_{base}, 2 \cdot (C_{blend} - 0.5)) & \text{if } C_{blend} \geq 0.5 \end{cases}
RangeModeOperationAmplification
0.0 - 0.5DarkenShadows intensified2× scaling
0.5 - 1.0LightenHighlights expanded2× scaling
ライブエディター
const fragment = () => {
      const basePattern = float(0.3).step(uv.x.mul(20).sin().abs())
      const blendGradient = uv.y
      const color = blendPinLightVec3(
              vec3(basePattern.mul(0.8).add(0.2)),
              vec3(blendGradient)
      )
      return vec4(color, 1)
}