dualLobeGlint
A highlight with a tight hot core and a wide dim halo.
dualLobeGlint(ndh: Expr, opts: {
/** `[exponent, gain]` of the hot core lobe. */
core: [number, number]
/** `[exponent, gain]` of the wide halo lobe. */
halo: [number, number]
softness?: Expr
gain: Expr
}): Expr
Import materials from shaders/std and use materials.dualLobeGlint.
ndh is the dot of the normal and the key light's .H. core and halo are [exponent, gain] pairs. softness (0–1, 0.5 neutral) widens or tightens both lobes.
Parameters
| Name | Type | Notes |
|---|---|---|
ndh | Expr | |
opts | `{ |
/** `[exponent, gain]` of the hot core lobe. */
core: [number, number]
/** `[exponent, gain]` of the wide halo lobe. */
halo: [number, number]
softness?: Expr
gain: Expr
}` | |
Example
const spec = dualLobeGlint(dot(n, key.member('H')), {core: [140, 1.3], halo: [22, 0.14], softness: u.highlightSoftness, gain: u.highlight})
See also
sharpGlint— A highlight whose tightness follows a sharpness slider.keyLightAt— A key light from an angle: the light direction.Land the half vector.Hfor highlights.lambert— How much a light falls on a surface: 0 facing away, 1 facing it.