AdvancedOptionaltextureOptions: TextureSourceOptionsoptions that will be passed to BaseRenderTexture constructor
options for creating a new TextureSource
Optional_resourceId?: numberOptionaladdressMode?: WRAP_MODEsetting this will set wrapModeU,wrapModeV and wrapModeW all at once!
OptionaladdressModeU?: WRAP_MODEspecifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.
OptionaladdressModeV?: WRAP_MODEspecifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.
OptionaladdressModeW?: WRAP_MODESpecifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.
OptionalalphaMode?: ALPHA_MODESthe alpha mode of the texture
Optionalantialias?: booleanOnly really affects RenderTextures. Should we use antialiasing for this texture. It will look better, but may impact performance as a Blit operation will be required to resolve the texture.
Optional AdvancedarrayLayerCount?: numberThe number of array layers for this texture source.
This maps to WebGPU's GPUTextureDescriptor.size.depthOrArrayLayers and is used for array-backed textures
such as cube maps (6 layers).
OptionalautoGarbageCollect?: booleanIf true, the Garbage Collector will unload this texture if it is not used after a period of time
OptionalautoGenerateMipmaps?: booleanShould we auto generate mipmaps for this texture? This will automatically generate mipmaps for this texture when uploading to the GPU. Mipmapped textures take up more memory, but can look better when scaled down.
For performance reasons, it is recommended to NOT use this with RenderTextures, as they are often updated every frame.
If you do, make sure to call updateMipmaps after you update the texture.
Optionalcompare?: COMPARE_FUNCTIONWhen provided the sampler will be a comparison sampler with the specified COMPARE_FUNCTION. Note: Comparison samplers may use filtering, but the sampling results will be implementation-dependent and may differ from the normal filtering rules.
Optional Readonlydestroyed?: booleanHas the style been destroyed?
Optionaldimensions?: TEXTURE_DIMENSIONShow many dimensions does this texture have? currently v8 only supports 2d
Optionaldynamic?: booleanUsed by RenderTexture.create to allow resizing. Not used by TextureSource itself.
Optionalformat?: TEXTURE_FORMATSthe format that the texture data has
Optionalheight?: numberthe pixel height of this texture source. This is the REAL pure number, not accounting resolution
Optionallabel?: stringoptional label, can be used for debugging
OptionallodMaxClamp?: numberSpecifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.
OptionallodMinClamp?: numberspecifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.
OptionalmagFilter?: SCALE_MODEspecifies the sampling behavior when the sample footprint is smaller than or equal to one texel.
OptionalmaxAnisotropy?: numberSpecifies the maximum anisotropy value clamp used by the sampler. Note: Most implementations support TextureStyle#maxAnisotropy values in range between 1 and 16, inclusive. The used value of TextureStyle#maxAnisotropy will be clamped to the maximum value that the platform supports.
setting this to anything higher than 1 will set scale modes to 'linear'
OptionalminFilter?: SCALE_MODEspecifies the sampling behavior when the sample footprint is larger than one texel.
OptionalmipLevelCount?: numberThe number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true
OptionalmipmapFilter?: SCALE_MODEspecifies behavior for sampling between mipmap levels.
Optionalresolution?: numberthe resolution of the texture.
Optionalresource?: Tthe resource that will be uploaded to the GPU. This is where we get our pixels from eg an ImageBimt / Canvas / Video etc
OptionalscaleMode?: SCALE_MODEsetting this will set magFilter,minFilter and mipmapFilter all at once!
OptionalviewDimension?: TEXTURE_VIEW_DIMENSIONSHow this texture is viewed/sampled by shaders.
This aligns with WebGPU's GPUTextureViewDescriptor.dimension. For example, cube maps are typically stored as a
2D texture with 6 array layers (dimensions: '2d') but viewed as viewDimension: 'cube'.
Optionalwidth?: numberthe pixel width of this texture source. This is the REAL pure number, not accounting resolution
OptionalwrapMode?: WRAP_MODEDestroys the style
Allow renderTextures of the same size as screen, not just pow2
Automatically sets to true after setScreenSize
The default options for texture pool
The default texture style for the pool
Clears the pool.
OptionaldestroyTextures: booleanDestroy all stored textures.
Creates texture with params that were specified in pool constructor.
Width of texture in pixels.
Height of texture in pixels.
Whether to automatically generate mipmaps for this texture
Gets a Power-of-Two render texture or fullScreen texture
The minimum width of the render texture.
The minimum height of the render texture.
The resolution of the render texture.
Whether to automatically generate mipmaps. Defaults to false.
The new render texture.
Gets a pooled texture matching the dimensions and resolution of the given texture.
This is a convenience wrapper around getOptimalTexture that copies width, height, and resolution from an existing texture. Useful when a filter needs a temporary texture the same size as its input (e.g., for multi-pass blur).
The texture whose dimensions to match.
Whether to use antialias on the pooled texture. Defaults to false.
A pooled texture with power-of-two backing dimensions at the source resolution.
Returns a texture to the pool so it can be reused by future getOptimalTexture or getSameSizeTexture calls.
If you modified the texture's style after obtaining it (e.g., changed filtering or wrapping),
pass resetStyle = true to restore the pool's default textureStyle.
This prevents style changes from leaking into subsequent consumers of the same pooled texture.
The texture to return to the pool.
When true, replaces the texture source's style with the pool default. Defaults to false.
Texture pool, used by FilterSystem and plugins.
Stores collection of temporary pow2 or screen-sized renderTextures
If you use custom RenderTexturePool for your filters, you can use methods
getFilterTextureandreturnFilterTexturesame as in default pool