Module bevy_render::texture
source · Structs§
- A cached GPU
Texturewith 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 wrapper for a
CachedTexturethat is used as aRenderPassColorAttachment. - A rendering resource for the default image sampler which is set during renderer initialization.
- A wrapper for a
TextureViewthat is used as a depth-onlyRenderPassDepthStencilAttachment. - A
RenderAppresource that contains the default “fallback image”, which can be used in situations where an image was not explicitly defined. The most common use case isAsBindGroupimplementations (such as materials) that support optional textures. - A
RenderAppresource that contains a “cubemap fallback image”, which can be used in situations where an image was not explicitly defined. The most common use case isAsBindGroupimplementations (such as materials) that support optional textures. - A Cache of fallback textures that uses the sample count and
TextureFormatas a key - A
RenderAppresource that contains a zero-filled “fallback image”, which can be used in place ofFallbackImage, when a fully transparent or black fallback is required instead of fully opaque white. - An error that occurs when loading a texture from a file.
- The GPU-representation of an
Image. Consists of theTexture, itsTextureViewand the correspondingSampler, and the texture’s size. - Loads HDR textures as Texture assets
- Loader for images that can be read by the
imagecrate. - Adds the
Imageas an asset and makes sure that they are extracted and prepared for the GPU. - Indicates to an
ImageLoaderhow anImageshould be sampled. As this type is part of theImageLoaderSettings, it will be serialized to an image asset.metafile which might require a migration in case of a breaking change. - A wrapper for a
TextureViewthat is used as aRenderPassColorAttachmentfor a view target’s final output texture. - This resource caches textures that are created repeatedly in the rendering process and are only required for one frame.
Enums§
- How edges should be handled in texture addressing.
- Comparison function used for depth and stencil operations.
- Texel mixing mode when sampling between texels.
- Used in
Image, this determines what image sampler to use when rendering. The default setting,ImageSampler::Default, will read the sampler from theImagePluginat setup. Setting this toImageSampler::Descriptorwill override the global default descriptor for thisImage. - Color variation to use when the sampler addressing mode is
ImageAddressMode::ClampToBorder. - The type of a raw image buffer.
- An error that occurs when loading a texture
Constants§
- A handle to a 1 x 1 transparent white image.
Traits§
- Extends the wgpu
TextureFormatwith information about the pixel. - Used to calculate the volume of an item.
Functions§
- Updates the
TextureCacheto only retains recently used textures.