Crate block_compression

Source
Expand description

§block_compression

Texture block compression using WGPU compute shader. The shaders are a port of Intel’s ISPC Texture Compressor’s kernel to WGSL compute shader.

Tested with the following backends:

  • DX12
  • Metal
  • Vulkan

§DX12 pipeline creation

The pipeline creation for BC7 and especially BC6H takes a long time under DX12. The DXC compiler seems to take a very long time to compile the shader. For this reason we moved them behind features, which are included in the default features.

§Supported block compressions

Currently supported block compressions are:

  • BC1
  • BC2
  • BC3
  • BC4
  • BC5
  • BC6H
  • BC7

Re-exports§

pub use bytemuck;
pub use half;bc6h

Modules§

decode
CPU based decoding.
encode
CPU based encoding.

Structs§

BC6HSettingsbc6h
Encoding settings for BC6H.
BC7Settingsbc7
Encoding settings for BC7.
GpuBlockCompressorwgpu and (bc15 or bc6h or bc7)
Compresses texture data with a block compression algorithm using WGPU compute shader.

Enums§

CompressionVariantbc15 or bc6h or bc7
Block compression variants supported by this crate.