sharpGlint

A highlight whose tightness follows a sharpness slider.

sharpGlint(ndh: Expr, sharpness: Expr, cfg: Expr): Expr

Import materials from shaders/std and use materials.sharpGlint.

ndh is the dot of the normal and the key light's .H. sharpness runs 0–1 and slides the exponent from cfg.x to cfg.y and the gain from cfg.z to cfg.w. Pass cfg as vec4(soft exponent, sharp exponent, soft gain, sharp gain).

Parameters

NameTypeNotes
ndhExpr
sharpnessExpr
cfgExpr

Example

const spec = sharpGlint(dot(n, key.member('H')), u.sharpness, vec4(60, 900, 0.4, 1.4))

See also

  • dualLobeGlint — A highlight with a tight hot core and a wide dim halo.
  • anisoSpecular — A highlight stretched along a grain, as on brushed metal or carbon fibre.
  • keyLightAt — A key light from an angle: the light direction .L and the half vector .H for highlights.

Used by

LiquidMetal, Water