---
title: "vec4: type in Runtime, TypeShade API reference"
description: "vec4, a type in Runtime. A vec4, the vector of four f32, as a host value: a readonly tuple of four f32."
url: https://typeshade.dev/api/vec4-type/
language: en
---

# `vec4`

Type in Runtime

A `vec4`, the vector of four `f32`, as a host value: a readonly tuple of four `f32`.

`import type { vec4 } from 'typeshade/runtime'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
type vec4 = readonly [f32, f32, f32, f32];
```

## In the guide

- [Your first shader](https://typeshade.dev/guide/internals/your-first-shader/)
- [Values and mutation](https://typeshade.dev/guide/internals/values-and-mutation/)
- [Functions and entry points](https://typeshade.dev/guide/internals/functions-and-entry-points/)
- [Layouts and resources](https://typeshade.dev/guide/internals/layouts-and-resources/)
- [The CPU oracle](https://typeshade.dev/guide/internals/the-cpu-oracle/)
- [Migrating a GLSL shader](https://typeshade.dev/guide/internals/migrating-a-glsl-shader/)

## Source

[`src/runtime/host-types.ts`, line 64](https://github.com/typeshade/typeshade/blob/af54ddad5/src/runtime/host-types.ts#L64), at commit af54ddad5
