Optionaloptions: TextureOptionsWhether the image is sRGB-encoded, as every photo or hand-painted
texture is ('srgb'), or holds numbers that only look like an image,
like a normal or roughness map ('linear', the default: no conversion).
'srgb' uploads with an sRGB internal format so the GPU decodes it to
linear values before the shader samples it.
Flip the image vertically on upload (default false). glTF and most
image loaders assume row 0 is the top; WebGL's texture coordinate
v = 0 is the bottom, so flipping here makes v = 0 line up with the
top of the picture instead of flipping UVs in the shader.
True for a texture made with Texture.empty: it has a size but no
pixels, so the renderer allocates GPU storage for it instead of
uploading image.
Set to true after the image (or its contents, e.g. a video frame or a canvas) changed so the renderer re-uploads it. The renderer resets it.
StaticemptyA texture with no image data yet, sized width x height. Used for
render target attachments: nothing ever samples this placeholder's
pixels, so its data is empty and only width/height are real -
the renderer allocates GPU storage at that size instead of uploading
pixels.
Optionaloptions: TextureOptionsStaticfromDecode a Blob (e.g. an image embedded in a .glb) with
createImageBitmap and wrap the result in a texture.
Optionaloptions: TextureOptionsStaticfromOptionaloptions: TextureOptions
A texture is plain data: an image plus sampling parameters. The renderer uploads it the first time it is used as a uniform and assigns texture units.