---
title: "tiltAlong"
description: "Tilts a normal along one 2D direction by a slope amount."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "materials"
categorySlug: "materials"
categoryTitle: "Materials & surfaces"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/materials.ts#L662"
---

# tiltAlong

Tilts a normal along one 2D direction by a slope amount.

```ts
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

```ts
const n = tiltAlong(nGeo, weaveDir, mul(crown, 0.3))
```

## See also

- [`tiltNormal`](/docs/primitives/materials/tiltnormal) — Tilts a normal along and across a direction, for brushed or woven relief.
- [`nudgeNormal`](/docs/primitives/materials/nudgenormal) — Tilts a normal by a slope in x and y, turning a height field into relief.

## Used by

[CarbonFiber](/docs/components/carbonfiber)