Skip to content

ref

ref<T>: T extends object ? T & ref<T> : ref<T>

A reference to a value T. Can be passed to other functions to give them mutable access to the underlying value.

Conceptually, it represents a WGSL pointer.

T

packages/typegpu/src/data/ref.ts:49