Interface Texture2DOptions
interface Texture2DOptions {
addressModeU?: GPUAddressMode;
addressModeV?: GPUAddressMode;
invertY?: boolean;
magFilter?: GPUFilterMode;
minFilter?: GPUFilterMode;
mipMaps?: boolean;
premultiplyAlpha?: boolean;
srgb?: boolean;
}
addressModeU?: GPUAddressMode;
addressModeV?: GPUAddressMode;
invertY?: boolean;
magFilter?: GPUFilterMode;
minFilter?: GPUFilterMode;
mipMaps?: boolean;
premultiplyAlpha?: boolean;
srgb?: boolean;
}
Hierarchy (View Summary)
- Texture2DOptions
Index
Properties
Optionaladdress Mode U
addressModeU?: GPUAddressMode
Address mode U. Default 'repeat'.
Optionaladdress Mode V
addressModeV?: GPUAddressMode
Address mode V. Default 'repeat'.
Optionalinvert Y
invertY?: boolean
Flip Y axis during upload. Default true (matches Babylon.js convention).
Optionalmag Filter
magFilter?: GPUFilterMode
Mag filter. Default 'linear'.
Optionalmin Filter
minFilter?: GPUFilterMode
Min filter. Default 'linear'.
Optionalmip Maps
mipMaps?: boolean
Generate mipmaps. Default true.
Optionalpremultiply Alpha
premultiplyAlpha?: boolean
Premultiply alpha at decode time. Default false (straight RGBA, matches PNG-on-disk).
Set true for sprite atlases that will be rendered with a premultiplied blend pipeline
(srcFactor: ONE); doing so produces mathematically correct soft edges and stacked
translucency.
Optionalsrgb
srgb?: boolean
Use sRGB format (rgba8unorm-srgb). Enables hardware sRGB→linear on sample. Use for color/albedo textures in PBR workflows. Default false.
Sampler, format, and decode options for
loadTexture2D().