---
title: "TS8027 MAT_UNSUPPORTED: a TypeShade compiler error code"
description: "TS8027 MAT_UNSUPPORTED, an error code of the TypeShade compiler. A non-square matCxR<f64>: the fp64 pass carries one double-float body for each dimension…"
url: https://typeshade.dev/reference/errors/ts8027/
language: en
---

# `TS8027`

Front-end code `MAT_UNSUPPORTED`

A non-square `matCxR<f64>`: the fp64 pass carries one double-float body for each dimension, so only a square matrix of doubles lowers. Every `matCxR<f32>` is a type.

The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.

The registry text and every compiler message on these pages are the compiler's own English.

## Example

example.shade.ts

```ts
"use typeshade"

class Uniforms {
  m: mat3x2<f64>
}

declare const u: uniform<Uniforms>

@fragment
export function main(uv: location<0, vec2>): vec4 {
  return vec4(uv, 0., 1.)
}
```

Compiled at build time against the pinned compiler, this program gets:

**TS8027** error, line 4: `mat3x2<f64>` has no emulated-double form: the fp64 pass carries a square matrix of doubles only (`mat2`, `mat3`, `mat4`). Declare it `mat3x2` and narrow, or use a square shape.

## How to fix it

The same program, corrected. It compiles with no diagnostic.

example.shade.ts

```ts
"use typeshade"

class Uniforms {
  m: mat3<f64>
}

declare const u: uniform<Uniforms>

@fragment
export function main(uv: location<0, vec2>): vec4 {
  return vec4(uv, 0., 1.)
}
```

## The rule this enforces

**[Rule 4.8](https://typeshade.dev/reference/rules/4-8/) Test**

Every `matCxR` with `C` and `R` in 2, 3, 4 must be a type, and a square one must also answer to `matN`.

## See also

- [Emulated double](https://typeshade.dev/guide/language/from-typescript/double/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

Where the compiler raises this code at commit af54ddad5, one line per file:

- [`src/compiler/ts/type-map.ts:974`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/type-map.ts#L974)
