---
title: "vec4b in WGSL, GLSL and TypeShade: shader type reference"
description: "vec4b is vec4<bool> in WGSL and bvec4 in GLSL ES 3.00. A four-component vector of bool: what comparing two vec4 values yields, componentwise."
url: https://typeshade.dev/reference/types/vec4b/
language: en
---

# `vec4b`

Type

A four-component vector of `bool`: what comparing two `vec4` values yields, componentwise.

The signature, the sentence and any message are the compiler's own text at commit af54ddad5.

## Syntax

```ts
interface vec4b {
  readonly [vecTag]: readonly ['bool', 4]
  [index: number]: bool
  x: bool
  y: bool
  z: bool
  w: bool
  r: bool
  g: bool
  b: bool
  a: bool
  …
}
```

The `…` line stands for 672 more members, the swizzles. A swizzle reads two to four components as a new vector of the same element type. The components come in any order and may repeat, and their letters come from one set, `xyzw` or `rgba`.

## See also

- [Types](https://typeshade.dev/reference/types/)
