---
title: "vec4b: WGSL, GLSL과 TypeShade에서 쓰는 형태와 그 뜻, 셰이더 타입 참조"
description: "TypeShade의 vec4b 타입은 WGSL에서 vec4<bool>, GLSL ES 3.00에서 bvec4 형태로 씁니다. A four-component vector of bool…"
url: https://typeshade.dev/ko/reference/types/vec4b/
language: ko
---

# `vec4b`

타입

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

시그니처와 이름 아래 문장, 컴파일러 메시지는 커밋 af54ddad5의 컴파일러가 쓴 영어 원문입니다.

## 구문

```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
  …
}
```

`…` 줄은 생략된 멤버 672개를 나타내며, 모두 스위즐입니다. 스위즐은 성분을 두 개에서 네 개까지 골라 원래 벡터와 같은 원소 타입의 새 벡터로 읽습니다. 성분 순서는 자유롭고 같은 성분을 반복해도 되지만, 글자는 `xyzw`나 `rgba` 한쪽에서만 골라야 합니다.

## 함께 보기

- [타입](https://typeshade.dev/ko/reference/types/)
