---
title: "pow"
description: "The first value raised to the power of the second."
group: "space"
groupTitle: "Shapes, frames & warps"
categoryId: "math"
categorySlug: "math"
categoryTitle: "Math"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/math.ts#L162"
---

# pow

The first value raised to the power of the second.

```ts
pow(x: Val, y: Val): Expr
```

Import `math` from `shaders/std` and use `math.pow`.

Shapes a 0..1 value: powers above 1 push it toward 0, powers below 1 toward 1. Keep the base non-negative.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `x` | `Val` |  |
| `y` | `Val` |  |

## Example

```ts
const hardened = pow(coverage, params.uniforms.hardness)
```

## See also

- [`sqrt`](/docs/primitives/math/sqrt) — The square root of a value.
- [`exp`](/docs/primitives/math/exp) — e raised to the value.

## Used by

[Aurora](/docs/components/aurora), [CarbonFiber](/docs/components/carbonfiber), [Crystal](/docs/components/crystal), [FlowingGradient](/docs/components/flowinggradient), [Frost](/docs/components/frost), [Goo](/docs/components/goo), [Heatmap](/docs/components/heatmap), [Hologram](/docs/components/hologram), [Holographic](/docs/components/holographic), [Irradiance](/docs/components/irradiance), [Nebula](/docs/components/nebula), [Plastic](/docs/components/plastic), [ReactionDiffusion](/docs/components/reactiondiffusion), [Voxels](/docs/components/voxels), [Water](/docs/components/water)