Title: Tile-Based Texture Mapping on Graphics Hardware
1Tile-Based Texture Mapping on Graphics Hardware
2Texture Mapping with Large Repetitive Pattern
Large terrain textures are very common Games,
simulation Issues Bandwidth for texture
access Memory/Cache for texture storage Need
texture compression
3Method 1General Image Compression
Implemented in graphics hardware VQ Beers96,
S3TC/DXT S3 Corporation ? Good for general
images Suboptimal for repetitive patterns
image
pattern
4Method 2Texture Tiling
- Only works for repetitive patterns
- ? Good compression ratio
- Requires changing texture coordinates
- No native texture filtering support
5Our Goal Texture Tiling on GPU
- ? No need to change texture coordinates
- ? Native texture filtering
- ? Implementation in fragment program
6Texture Tiling Simple Case
Input tile
- ? Infinite compression
- ? Good for GPU
- ? Fast decoding
- Repetition
Arbitrarily large output texture
7Texture Tiling Wang Tiles
Input tiles
? replace repetition by non-periodic tiling
Arbitrarily large output texture
8How Wang Tile Works
3
4
1
2
Input tiles
adjacent tiles share identical edge color
continuous pattern across identical edge color
9Wang Tiles for Texture Mapping on GPU ?
- Original Cohen03
- Sequential tiling
- No texture filtering across tiles
- Not good for GPU
- Our approach
- ? Random-accessible tiling
- ? Native texture filtering across tiles
- ? Good for GPU
- Need more tiles
10Overview of Our System
Tile hashing
Packed input tiles (correct filtering across
tiles)
Output virtual texture
11Random Access by Tile Hashing
12Random Access by Tile Hashing
- Tile index (Oh, Ov)
- Hash function H()
- Edge color ? (Oh, Ov)
- Cs H( H(Oh) Ov )
- Cn H( H(Oh) Ov 1)
- Cw H( Oh H(2Ov) )
- Ce H( Oh 1 H(2Ov) )
- ? Consistency
- e.g. Ce(1, 2) Cw(2, 2)
- ? Direct evaluation
- No sequential dependency
- ? Easy to compute
13Tile Hashing Quality
- H() simply a permutation table
- Hashing quality depends on table size
Image size 32 x 32
8 entries
16 entries
32 entries
14Random Access Needs All Possible Tile Edge Colors
Input tiles
with all edge colors
Output virtual texture
15How to Filter Tiled Texture ?
- Shader filtering
- ? flexible
- slow
- gt 1 texture
No good packing (for general case)
16Tile Packing for Texture Filtering
- tiles with all colors (for random access)
- ? each tile used once (no wasted memory)
- ? continuous boundary (native filtering)
- ? easy to compute
Packed input tiles
17Tile Packing in 1D
0
0
0
0
1
2
2
2
1
1
e1
e2
- Index(e1, e2)
- 0, e1 e2 0
- e12 2e2 1, e1 gt e2 gt 0
- e22 2e1, e2 gt e1 0
- (e2 1)2 - 2, e1 e2 gt 0
- (e1 1)2 - 1, e1 gt e2 0
- ? each tile used once
- ? continuous boundary
- ? easy to compute
18Tile Packing in 2D
19Implementation and Performance
- Implementation
- Cg without hand optimization
- Performance
- (million tri-linear texels per second on Geforce
FX 5600) - 2.7 full fragment program implementation
- 20 pre-compute tile hashing in a texture
20Results
Input tiles
Result with virtual texture size 8192x8192
21Results
Correct tile edge
Incorrect low-res tile
Input tiles
Traditional texture map
Correct tile edge/corner
22Limitations
- Incorrect lower-resolution MIPMAP levels
- Need tile set with all possible edge colors
- Not fast enough
23Future Work
- Performance improvement
- Driver implementation
- Hash instruction in hardware
- 3D texture tile
24Acknowledgements
- Wei-Chao Chen
- Read the 1st paper draft
- Says I should submit
- John Danskin
- Permission to submit
- Reviewers
- NVIDIANS
25Questions?
26(No Transcript)
27(No Transcript)
28Limitations
- Incorrect lower-resolution MIPMAP levels
- Need tile set with all possible edge colors
- Not fast enough
1
2
1
3
29Filtering Result Tile Edge
Result without correct input tile packing
Input tiles
Result with correct input tile packing
30Filtering Result Tile Corner
Result without corner handling
Input tiles
Result with corner handling
31Ungrouped Border and Image
32Grouped Border and Image
33Grouped Border and Image
34(No Transcript)
35(No Transcript)
36http//www.siggraph.org/education/materials/HyperG
raph/shutbug.htm
37S2004 Arial, Bold, 37 points
- This subtitle is 31 points
- Bullets are orange text is 26 points
- They have 110 line spacing, 6 points
before/after - Longer bullets in the form of a paragraph are
harder to read if there is insufficient line
spacing. This is the maximum recommended number
of lines per slide (seven). - Sub-bullets look like this.