fresnelBoost

A multiplier that brightens grazing edges: 1 face-on, up to 1 + amount at the rim.

fresnelBoost(grazing: Expr, opts: {power?: number; amount: Expr | number}): Expr

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

grazing comes from grazingOf or grazingFlat. power (default 3) sets how tightly the lift hugs the rim.

Parameters

NameTypeNotes
grazingExpr
opts{power?: number; amount: Expr | number}

Example

const lit = mul(env, fresnelBoost(grazingOf(n, view), {amount: 0.6}))

See also

  • schlickFresnel — How mirror-like a surface is at this pixel: r0 face-on, rising to r0 + gain at the rim.
  • grazingOf — How edge-on the surface is to the viewer: 0 face-on, 1 grazing.
  • grazingFlat — How edge-on the surface is to a straight-on viewer: 0 face-on, 1 grazing.

Used by

BrushedMetal