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 wrapper for a
CachedTexture
that is used as aRenderPassColorAttachment
. - A rendering resource for the default image sampler which is set during renderer initialization.
- A wrapper for a
TextureView
that is used as a depth-onlyRenderPassDepthStencilAttachment
. - 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. - 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 textures that uses the sample count and
TextureFormat
as a key - A
RenderApp
resource 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
, itsTextureView
and the correspondingSampler
, and the texture’s size. - Loader for images that can be read by the
image
crate. - Adds the
Image
as an asset and makes sure that they are extracted and prepared for the GPU. - Indicates to an
ImageLoader
how anImage
should be sampled. As this type is part of theImageLoaderSettings
, it will be serialized to an image asset.meta
file which might require a migration in case of a breaking change. - A wrapper for a
TextureView
that is used as aRenderPassColorAttachment
for 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 theImagePlugin
at setup. Setting this toImageSampler::Descriptor
will 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
TextureFormat
with information about the pixel. - Used to calculate the volume of an item.
Functions§
- Updates the
TextureCache
to only retains recently used textures.