Module bevy_render::texture
source · Structs
- A cached GPU
Texture
with correspondingTextureView
. 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 isAsBindGroup
implementations (such as materials) that support optional textures.FallbackImage
defaults to a 1x1 fully white texture, making blending colors with it a no-op. - 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 isAsBindGroup
implementations (such as materials) that support optional textures. - A Cache of fallback depth textures that uses the sample count as a key
- A Cache of fallback textures that uses the sample count as a key
- An error that occurs when loading a texture from a file.
- The GPU-representation of an
Image
. Consists of theTexture
, itsTextureView
and the correspondingSampler
, and the texture’s size. - 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. - 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 theImagePlugin
at setup. Setting this toImageSampler::Descriptor
will override the global default descriptor for thisImage
. - 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.