---
title: "beerLambert"
description: "How much light survives a thickness of tinted material, per channel."
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#L883"
---

# beerLambert

How much light survives a thickness of tinted material, per channel.

```ts
beerLambert(thickness: Expr, absorb: Expr): Expr
```

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

`absorb` is an rgb absorption; higher absorbs more. Returns rgb transmission 0–1. Multiply the color behind by it.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `thickness` | `Expr` |  |
| `absorb` | `Expr` |  |

## Example

```ts
const transmit = beerLambert(mul(opticalThickness(field, frame), u.density), absorb)
```

## See also

- [`opticalThickness`](/docs/primitives/materials/opticalthickness) — How much material the view passes through at this pixel: 0 at the edge, up to about 1.2 deep inside.

## Used by

[Frost](/docs/components/frost), [Water](/docs/components/water)