grazingOf

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

grazingOf(n: Expr, view: Expr): Expr

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

The input the fresnel words take when you have a view ray. Without one, use grazingFlat.

Parameters

NameTypeNotes
nExpr
viewExpr

Example

const grazing = grazingOf(n, viewRay(params, field))

See also

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

Used by

BrushedMetal, CarbonFiber, Chrome, Obsidian, Voxels