Module bevy::render::texture

Structs

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.
A rendering resource for the default image sampler which is set during renderer initialization.
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. FallbackImage defaults to a 1x1 fully white texture, making blending colors with it a no-op.
An error that occurs when loading a texture from a file.
The GPU-representation of an Image. Consists of the Texture, its TextureView and the corresponding Sampler, and the texture’s size.
Loads HDR textures as Texture assets
Adds the Image as an asset and makes sure that they are extracted and prepared for the GPU.
Loader for images that can be read by the image crate.
Information about the pixel size in bytes and the number of different components.
This resource caches textures that are created repeatedly in the rendering process and are only required for one frame.

Enums

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.
The type of a raw image buffer.
An error that occurs when loading a texture

Constants

Traits

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

Functions

Updates the TextureCache to only retains recently used textures.