Optional
labelThe label of the Texture, used to create various GPU objects for debugging purpose.
Optional
nameName of the Texture to use in the texture binding.
Optional
fixedOptional
usageAllowed usages for the GPU texture as an array of texture usages names.
Optional
autoOptional
fromOptional texture to use as a copy source input. Could be a Texture or DOMTexture.
Optional
qualityForce the texture size to be set to the given ratio of the renderer canvas size or fixedSize. Used mainly to shrink render target texture definition.
Optional
typeWhether to use this Texture as a regular, storage or depth texture.
Optional
accessOptional texture binding memory access type, mainly used for storage textures.
Optional
sampleSample count of the texture, used for multisampling.
Optional
formatThe GPUTexture format to use. Default to 'rgba8unorm'
.
Optional
generateWhether to generate mips. Default to false
.
Optional
flipYWhether to flip the source along the Y axis. Default to false
.
Optional
premultipliedWhether this texture should be premultiplied or not. Default to false
.
Optional
viewThe GPUTexture view dimension to use. Default to '2d'
.
Optional
aspectDefine which aspect of the texture to write the image to. Default to all
.
Optional
colorDefine the colorSpace and encoding used to encode data into the destination texture. Default to srgb
.
Optional
visibilityThe texture shaders visibility sent to the texture binding. Default to 'fragment'
.
Parameters used to create a Texture.