Documentation / spryte / asData
Function: asData()
asData<
T>(source):T
Defined in: linear.ts:12
Marks an image as data, not colour: an MSDF atlas, a noise or lookup table. Under blendSpace: "linear" colour images are stored as sRGB so sampling returns linear light; a data image keeps its bytes as they are, which is what a shader reading distances or indices needs. Call it before the image is first drawn. Has no effect under the default sRGB blending. Returns the image.
Type Parameters
T
T extends object
Parameters
source
T
Returns
T