---
title: "schlickFresnel"
description: "How mirror-like a surface is at this pixel: `r0` face-on, rising to `r0 + gain` at the rim."
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#L1157"
---

# schlickFresnel

How mirror-like a surface is at this pixel: `r0` face-on, rising to `r0 + gain` at the rim.

```ts
schlickFresnel(
  grazing: Expr,
  opts: {r0?: number; gain: Expr | number; power?: number},
): Expr
```

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

`grazing` comes from `grazingOf` or `grazingFlat`. Glass is `{r0: 0.04, gain: 0.96}`. Lower the gain to keep the rim from turning into a full mirror over an interior.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `grazing` | `Expr` |  |
| `opts` | `{r0?: number; gain: Expr \| number; power?: number}` |  |

## Example

```ts
const fresnel = schlickFresnel(grazingOf(n, view), {gain: 0.6})
```

## See also

- [`fresnelBoost`](/docs/primitives/materials/fresnelboost) — A multiplier that brightens grazing edges: 1 face-on, up to `1 + amount` at the rim.
- [`grazingOf`](/docs/primitives/materials/grazingof) — How edge-on the surface is to the viewer: 0 face-on, 1 grazing.
- [`reflect`](/docs/primitives/math/reflect) — The direction `i` bounced off a surface with unit normal `n`.

## Used by

[Obsidian](/docs/components/obsidian), [Voxels](/docs/components/voxels), [Water](/docs/components/water)