mat3x3f
On this page

mat3x3f

Function

Builds a mat3x3f, the same type as mat3x3 under WGSL's predeclared alias, in the same four ways: from 3 vec3 columns, from 9 components column by column, from a larger matrix by truncation, or with no arguments for the zero matrix (§40).

The signature and the sentence under each name are the compiler's own text at commit 26de7be8.

Syntax

declare function mat3x3f(): mat3x3
declare function mat3x3f(c0: vec3, c1: vec3, c2: vec3): mat3x3
declare function mat3x3f(e0: number, e1: number, e2: number, e3: number, e4: number, e5: number, e6: number, e7: number, e8: number): mat3x3
declare function mat3x3f(m: mat3x3): mat3x3
declare function mat3x3f(m: mat3x4): mat3x3
declare function mat3x3f(m: mat4x3): mat3x3
declare function mat3x3f(m: mat4x4): mat3x3

A number in a parameter or a return position is the scalar slot. The ambient file declares a GPU scalar as a branded number whose brand is optional, so a literal and any branded scalar both fill it.

type f32 = number & { readonly [f32Tag]?: true }

A declaration you write still needs a width, and a bare number on a field or a parameter is refused; the TypeScript constructs page carries that row with the compiler's own message.

Parameters

  • c0 optional vec3
  • e0 optional number
  • m optional mat3x3mat3x4mat4x3mat4x4
  • c1 optional vec3
  • e1 optional number
  • c2 optional vec3
  • e2 optional number
  • e3 optional number
  • e4 optional number
  • e5 optional number
  • e6 optional number
  • e7 optional number
  • e8 optional number

Return value

mat3x3

See also

Edit this page Report a problem