TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Yanlu Dhtc Hdr Texture Compression
1. DHTC: An Effective DXTC-based HDR
Texture Compression Scheme
Wen Sun1,2 Yan Lu1 Feng Wu1 Shipeng Li1
yanlu@microsoft.com
1 Microsoft Research Asia
2 University of Science and Technology of China
2. Outline
• Background and related work
̵ High dynamic range (HDR) texture and its compression
• DHTC: DXTC-based HDR texture compression
̵ Extension of LDR texture format (i.e. DXTC) to HDR texture
compression
̵ Unified 8-bpp format for LDR textures, HDR textures and
alpha maps
• Results and summary
2
3. HDR Textures
Low exposure Medium exposure High exposure
• The real world is high dynamic range
• A dynamic range of 10000:1 is common
• HDR rendering is gaining popularity in practice
3
4. HDR Texture Compression
• HDR textures are huge in size
̵ Currently used FP32/FP16 formats: 96/48 bits per pixel,
4x/2x size of raw LDR RGB textures
̵ Consume too much memory and bandwidth
• Current status
̵ No HDR texture compression standard in industry
̵ No graphics card supports rendering from block-wise
compressed HDR textures
4
5. Previous Work
• [Wang et al. 2007]
̵ 16-bpp HDR texture format
̵ Utilization of current generation GPUs
• [Roimela et al. 2006, 2008]
̵ 8-bpp HDR texture format
̵ Simple hardware decoder
• [Munkberg et al. 2006, 2008]
̵ 8-bpp HDR texture format
̵ Near lossless visual quality
5
6. Our Insights
• HDR texture compression scheme can be built upon
existing LDR texture compression scheme
̵ Lead to a unified compression framework
̵ Reuse existing hardware
• Joint color-channel compression can result in better
visual quality
̵ Joint-channel bit allocation
̵ Utilization of cross-channel correlations
• It is a plus to support LDR textures and alpha maps in
a single HDR texture format
6
7. Our Solution
• DXTC-based HDR texture compression framework
̵ Utilize joint color-channel compression to provide
advanced bit allocation
̵ Utilize the existing DXTC hardware to reduce the adoption
cost in industry
• 8 bpp compressed DHTC texture format
̵ Near lossless visual quality for HDR textures
̵ Support 1 bit alpha channel for HDR textures
̵ Backward compatible to LDR RGBA textures
7
8. Framework
Extract joint
Avoid error Utilize local channel
accumulation property correlation
Original Adaptive Local HDR Joint-Channel Compressed
HDR Texture Color Trans. Reduction Compression HDR Texture
Point
Translation
Reshape texel
distribution
8
9. Adaptive Color Transform
• Traditional color transform
Forward Color Inverse Color
Transform Transform
Y wr R wg G wb B R U Y / wr Error controllable
channels
U
wr R Explicit G V Y / wg
Y channels
B (Y wr R wg G ) / wb Error accumulative
wg G channel
V
Y
wB Implicit
W b
Y channel Absolute errors
9
10. Adaptive Color Transform
• Our solution
̵ Adaptively select the implicit channel to minimize the
impact of error accumulation
Keep the block
dominant color
Luminance and channel from
chrominance channels being explicitly
encoded
Adaptive color
transform mode
10
11. Luminance Local Dynamic Range Reduction
• Extract the block upper and lower bounds
Extract the block upper &
lower bounds
(Global Base Luma – L0, L1)
Mapping Global
HDR to Local LDR
(Floating Point -> integer)
11
12. Chrominance Local Dynamic Range Reduction
• Adaptive color transform significantly reduces the
chrominance dynamic range
Chrominance value distribution in [0, 1]
12
13. Chrominance Local Dynamic Range Reduction
• Proposed adaptive log/linear encoding
Use a 1-bit flag in
each texture block
to adaptively select
the encoding mode
Linear encoding is better
Log encoding is better
13
14. Joint Channel Compression & Point Translation
• Basic idea – Joint channel linear fitting
̵ Simple and hardware friendly Y
̵ But rely on texel distribution
V
• Point translation U
̵ Translate texels along Y axis to reshape the distribution
14
15. Point Translation
• We use a constant modifier table to provide
translation vector for each texel
Look Up
Translation
Vectors
One HDR texture block Modifier table
15
16. Point Translation
• We use a constant modifier table to provide
translation vector for each texel
Look Up
Translation
Vectors
One HDR texture block Modifier table
16
17. DHTC Format
• Bits layout of a 4x4 block 64 bits 64 bits
Extension Block DXT1 Block
Local dynamic
range reduction
L0 L1 (5+5) bits
4 bits T_idx Ch_mode 2 bits
Adaptive color XXX XXX XXX XXX
transform M_idx
XXX XXX XXX XXX
16x3 bits
XXX XXX XXX XXX
XXX XXX XXX XXX
Point translation
Base Y0 X0 Z0 2x(5+6+5)
Color Y1 X1 Z1 bits
Joint channel XX XX XX XX
compression XX XX XX XX 16x2
C_idx
XX XX XX XX bits
XX XX XX XX
17
18. Decoding Logic for HDR Textures
L0 L1 Ch_mode T_idx M_idx C_idx X0 Y0 Z0 X1 Y1 Z1
Modifier
Table DXT
Decoder
MUX
Yint Uint Vint
Log
Decoder
Y U V
Inverse Color
Transform
Rh Gh Bh
18
19. Decoding Logic for LDR Textures
L0 L1 Ch_mode T_idx M_idx C_idx X0 Y0 Z0 X1 Y1 Z1
Modifier
Table DXT
Decoder
MUX
MUX
0 255
x y
(which texel)
MUX
A R G B
19
36. Results
• Alpha coding for LDR textures
̵ Less block artifact in our method
DHTC DXT5
36
37. Summary
• DXTC-based HDR texture compression
̵ Compress HDR textures into 8 bpp with the best quality so
far
̵ Utilize the existing DXTC decoding hardware to minimize
the adoption cost
̵ Provide a unified solution to compress HDR textures, LDR
textures and alpha maps
37
38. Acknowledgements
• Kimmo Roimela of Nokia Research Center and Jacob
Munkberg of Lund University for providing their
testing results for comparison.
• Xin Tong, Liyi Wei, Baining Guo, John Tardif, Matt
Bronder, Andrew Flavell of Microsoft for the valuable
comments and suggestions.
• John Owens of Univ. of California, Davis, for the helps
in improving the paper quality.