texture2duT
Constant in Types
An unsigned-integer 2D texture.
import { texture2duT } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const texture2duT: { readonly kind: "texture"; readonly dim: "2d"; readonly elem: "u32"; }Description
Read it
with textureLoad, which returns a vec4<u32>. It carries exact 32-bit values, which
makes it the right backing for an id, packed-colour or bitfield lookup that must reach the
GPU unchanged. It is unfilterable: textureSample on it is a tsc error (see
TextureElem).
In the guide
See also
Source
src/core/ir/types.ts, line 621, at commit 26de7be8