Module texture

Module texture 

Source

Structs§

CachedTexture
A cached GPU Texture with corresponding TextureView. This is useful for textures that are created repeatedly (each frame) in the rendering process to reduce the amount of GPU memory allocations.
ColorAttachment
A wrapper for a CachedTexture that is used as a RenderPassColorAttachment.
CompressedImageFormats
DefaultImageSampler
A rendering resource for the default image sampler which is set during renderer initialization.
DepthAttachment
A wrapper for a TextureView that is used as a depth-only RenderPassDepthStencilAttachment.
FallbackImage
A RenderApp resource that contains the default “fallback image”, which can be used in situations where an image was not explicitly defined. The most common use case is AsBindGroup implementations (such as materials) that support optional textures.
FallbackImageCubemap
A RenderApp resource that contains a “cubemap fallback image”, which can be used in situations where an image was not explicitly defined. The most common use case is AsBindGroup implementations (such as materials) that support optional textures.
FallbackImageFormatMsaaCache
A Cache of fallback textures that uses the sample count and TextureFormat as a key
FallbackImageMsaa
FallbackImageZero
A RenderApp resource that contains a zero-filled “fallback image”, which can be used in place of FallbackImage, when a fully transparent or black fallback is required instead of fully opaque white.
FileTextureError
An error that occurs when loading a texture from a file.
GpuImage
The GPU-representation of an Image. Consists of the Texture, its TextureView and the corresponding Sampler, and the texture’s size.
HdrTextureLoader
Loads HDR textures as Texture assets
HdrTextureLoaderSettings
Image
ImageLoader
Loader for images that can be read by the image crate.
ImageLoaderSettings
ImagePlugin
Adds the Image as an asset and makes sure that they are extracted and prepared for the GPU.
ImageSamplerDescriptor
Indicates to an ImageLoader how an Image should be sampled. As this type is part of the ImageLoaderSettings, it will be serialized to an image asset .meta file which might require a migration in case of a breaking change.
OutputColorAttachment
A wrapper for a TextureView that is used as a RenderPassColorAttachment for a view target’s final output texture.
TextureCache
This resource caches textures that are created repeatedly in the rendering process and are only required for one frame.

Enums§

DataFormat
HdrTextureLoaderError
ImageAddressMode
How edges should be handled in texture addressing.
ImageCompareFunction
Comparison function used for depth and stencil operations.
ImageFilterMode
Texel mixing mode when sampling between texels.
ImageFormat
ImageFormatSetting
ImageLoaderError
ImageSampler
Used in Image, this determines what image sampler to use when rendering. The default setting, ImageSampler::Default, will read the sampler from the ImagePlugin at setup. Setting this to ImageSampler::Descriptor will override the global default descriptor for this Image.
ImageSamplerBorderColor
Color variation to use when the sampler addressing mode is ImageAddressMode::ClampToBorder.
ImageType
The type of a raw image buffer.
TextureError
An error that occurs when loading a texture
TranscodeFormat

Constants§

SAMPLER_ASSET_INDEX
TEXTURE_ASSET_INDEX
TRANSPARENT_IMAGE_HANDLE
A handle to a 1 x 1 transparent white image.

Traits§

BevyDefault
TextureFormatPixelInfo
Extends the wgpu TextureFormat with information about the pixel.
Volume
Used to calculate the volume of an item.

Functions§

ktx2_buffer_to_image
ktx2_dfd_to_texture_format
ktx2_format_to_texture_format
ktx2_get_texture_format
update_texture_cache_system
Updates the TextureCache to only retains recently used textures.