Texture sources.
Texture sources type.
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'
.
Optional
placeholderSolid color used by temporary texture to display while loading the source, as an array of RGBA
integer values in the [0, 255]
range. Default to [0, 0, 0, 255]
(solid black).
Optional
useWhether video textures should use GPUExternalTexture or not. Default to true
.
Optional
cacheOptional
useWhether to use a transformation Mat3 to use in the shaders for UV transformations. If set to true
, will create a BufferBinding accessible in the shaders with the name ${texture.options.name}Matrix
.
Options used to create this MediaTexture.