grazingFlat

How edge-on the surface is to a straight-on viewer: 0 face-on, 1 grazing.

grazingFlat(n: Expr): Expr

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

Use it when the material has no viewRay. The fresnel input for plastics, frost and water.

Parameters

NameTypeNotes
nExpr

Example

const grazing = grazingFlat(n)

See also

  • grazingOf — How edge-on the surface is to the viewer: 0 face-on, 1 grazing.
  • schlickFresnel — How mirror-like a surface is at this pixel: r0 face-on, rising to r0 + gain at the rim.
  • fresnelBoost — A multiplier that brightens grazing edges: 1 face-on, up to 1 + amount at the rim.

Used by

Crystal, Frost, Goo, Plastic, Water