---
title: "mat4 in WGSL, GLSL and TypeShade: shader type reference"
description: "mat4 is mat4x4<f32> in WGSL and mat4 in GLSL ES 3.00. 4x4 matrix of f32, column-major, same type as mat4x4."
url: https://typeshade.dev/reference/types/mat4/
language: en
---

# `mat4`

Type

4x4 matrix of `f32`, column-major, same type as `mat4x4`.

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

## Syntax

```ts
type mat4<T extends f32 | f64 = f32> = mat4x4<T>
```

## Parameters

- `T` optional `f32 | f64`

## Examples

- [`gallery/bit-bump/bit-bump.shade.ts`](https://typeshade.dev/guide/examples/bit-bump/)
- [`gallery/hello-camera/hello-camera.shade.ts`](https://typeshade.dev/guide/examples/hello-camera/)
- [`gallery/normal-matrix/normal-matrix.shade.ts`](https://typeshade.dev/guide/examples/normal-matrix/)

## See also

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