blendOverlay
Replicates Photoshop's 'Overlay' blend mode, which simultaneously darkens the dark areas and lightens the light areas of the base color based on the blend layer, dramatically enhancing overall contrast and textural detail.
Core Advantages
Common Uses
Adding rich texture like scratches and stains to flat surfaces using a detail map (Grunge Map).
Acting as a color grading filter in post-processing to boost contrast and apply a color tint.
Compositing wood grain or marble patterns for a natural, high-contrast look.
Simulating dappled light and shadow effects (Gobos) for more dynamic lighting.
How to adjust
The 50% gray in the `blend` input is the 'neutral color' and has no effect on the base. `blend` colors darker than 50% gray will darken the base, while lighter colors will lighten it. This makes it perfect for applying detail textures with light, dark, and gray areas to add texture to a material. For instance, with a weathering map, its dark rust patches will darken the metal color, while its light scratch marks will brighten it.
Code Examples
1// Overlay the "texture" of a weathering map onto a metal base color
2const weatheredMetal = blendOverlay( metalBaseColor, weatheringTexture );