tiltAlong
Tilts a normal along one 2D direction by a slope amount.
tiltAlong(n: Expr, axis: Expr, amount: Expr, hint: string = 'n'): Expr
Import materials from shaders/std and use materials.tiltAlong.
axis is a unit 2D vector such as direction() or fieldSlope. A few tenths is a visible tilt.
Parameters
| Name | Type | Notes |
|---|---|---|
n | Expr | |
axis | Expr | |
amount | Expr | |
hint | string | Optional. Default 'n'. |
Example
const n = tiltAlong(nGeo, weaveDir, mul(crown, 0.3))
See also
tiltNormal— Tilts a normal along and across a direction, for brushed or woven relief.nudgeNormal— Tilts a normal by a slope in x and y, turning a height field into relief.