Module atlas

Source
Expand description

Texture atlas.

All images are packed into an atlas at staging time. Texture descriptors describe where in the atlas an image is, and how it should sample pixels. These descriptors are packed into a buffer on the GPU. This keeps the number of texture binds to a minimum (one, in most cases).

§NOTE:

Atlas is a temporary work around until we can use bindless techniques on web.

Atlas is only available on CPU. Not available in shaders.

Modules§

shader

Structs§

Atlas
A texture atlas, used to store all the textures in a scene.
AtlasBlitter
A texture blitting utility.
AtlasBlittingOperation
A reusable blitting operation that copies a source texture into a specific frame of an Atlas.
AtlasImage
Image data in transit from CPU to GPU.
AtlasTexture
A staged texture in the texture atlas.
Layer
TextureModes
Method of addressing the edges of a texture.

Enums§

AtlasError
AtlasImageError
AtlasImageFormat
TextureAddressMode
How edges should be handled in texture addressing/wrapping.

Functions§

clamp
Clamp the input between 0.0 and 1.0.
convert_pixels
Interpret/convert the AtlasImage pixel data into wgpu::TextureFormat pixels, if possible.
repeat
Infinitely wrap the input between 0.0 and 1.0.