---
title: "isZero"
description: "Skip the filter entirely while `prop` is exactly 0."
group: "define"
groupTitle: "Defining a shader"
categoryId: "slots"
categorySlug: "slots"
categoryTitle: "Identity & recompile rules"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/slots.ts#L63"
---

# isZero

Skip the filter entirely while `prop` is exactly 0.

```ts
isZero(prop: string): IdentityRule
```

Import `isZero` from `shaders/std`.

Put it on `identityWhen:`. An unset prop counts as its default. A prop that is mapped per pixel by a driver disables the skip automatically, since the value then varies across the canvas. Give the prop `recompile: crosses(0)` so the skip switches on and off.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `prop` | `string` |  |

## Example

```ts
identityWhen: isZero('intensity')
```

## See also

- [`isValue`](/docs/primitives/slots/isvalue) — Skip the filter entirely while `prop` equals `value`, for a filter whose no-op is not 0.
- [`allOf`](/docs/primitives/slots/allof) — Skip the filter only while every rule holds, for a no-op that needs several props at rest.
- [`crosses`](/docs/primitives/slots/crosses) — Rebuild the shader only when the prop crosses `value`, not on every change.

## Used by

[BrightnessContrast](/docs/components/brightnesscontrast), [FilmGrain](/docs/components/filmgrain), [GradientMap](/docs/components/gradientmap), [HueShift](/docs/components/hueshift), [Sharpness](/docs/components/sharpness), [Solarize](/docs/components/solarize), [Sparkle](/docs/components/sparkle), [Vibrance](/docs/components/vibrance), [Vignette](/docs/components/vignette)