---
title: "nudgeNormal"
description: "Tilts a normal by a slope in x and y, turning a height field into relief."
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#L747"
---

# nudgeNormal

Tilts a normal by a slope in x and y, turning a height field into relief.

```ts
nudgeNormal(n: Expr, dx: Expr, dy: Expr, hint: string = 'n'): Expr
```

Import `materials` from `shaders/std` and use `materials.nudgeNormal`.

Feed it the `dx`/`dy` of `fdSlope` or `perlinSlope`, scaled by how strong you want the relief. Works on a flat `vec3(0, 0, -1)` normal as well as a shape's normal.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `n` | `Expr` |  |
| `dx` | `Expr` |  |
| `dy` | `Expr` |  |
| `hint` | `string` | Optional. Default `'n'`. |

## Example

```ts
const n = nudgeNormal(vec3(0, 0, -1), mul(relief.dx, 0.08), mul(relief.dy, 0.08))
```

## See also

- [`fdSlope`](/docs/primitives/materials/fdslope) — The value and slope of any field at a point: `value`, `dx` and `dy`.
- [`perlinSlope`](/docs/primitives/materials/perlinslope) — The slope of smooth noise at a point, for wavy or molten relief.
- [`tiltNormal`](/docs/primitives/materials/tiltnormal) — Tilts a normal along and across a direction, for brushed or woven relief.
- [`geometricNormal`](/docs/primitives/materials/geometricnormal) — The surface normal of the shape, whichever kind of shape is active.

## Used by

[Chrome](/docs/components/chrome), [Frost](/docs/components/frost), [LiquidMetal](/docs/components/liquidmetal), [Plastic](/docs/components/plastic), [Satin](/docs/components/satin)