overlay
[DEPRECATED] A node for applying the 'Overlay' blend mode, which combines two color layers by increasing contrast and saturation. Please use the `blendOverlay` node instead.
Core Advantages
This node's primary value is backward compatibility, guiding developers to the new `blendOverlay` node. The 'Overlay' effect it produces intelligently enhances contrast based on the base layer's brightness, preserving highlight and shadow details.
Common Uses
Adding detail textures like scratches or dirt onto a base material to enhance realism.
Blending bloom or lens flare effects in post-processing to accentuate scene highlights.
Applying color correction or stylization to an entire scene by overlaying a color layer.
How to adjust
All adjustments should be made on the `blendOverlay` node. The effect is driven by the `base` layer's brightness: dark areas (<0.5) are darkened, and light areas (>0.5) are lightened. Adjusting the `opacity` parameter smoothly controls the effect's strength, from 0 (no effect) to 1 (full effect). Using a high-contrast `blend` layer will significantly enhance the texture of the `base` layer.
Code Examples
1// NOTE: overlay is deprecated. Please use blendOverlay directly.
2// It intelligently mixes the blend layer based on the base layer's brightness.
3const finalColor = blendOverlay( base, blend, opacity );