texture2duT
Constant in Types
An unsigned-integer 2D texture.
import { texture2duT } from 'typeshade/core/ir'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
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).
See also
Source
src/core/ir/types/texture-types.ts, line 49, at commit af54ddad5