teaser

Cardinality-Constrained Texture Filtering

We combine optimized sets of texels from multiple levels in a mipmap pyramid to accurately reproduce filter kernels. Whereas samples from a mipmap are typically interpolated, we view sampling a mipmap as a problem of function approximation. Using half the texture bandwidth as trilinear interpolation, we generate clearer images.

download pdf download preprint

BibTeX

@article{Manson:2013:CCTF,
  author  = {Josiah Manson and
             Scott Schaefer},
  title   = {Cardinality-Constrained Texture Filtering},
  journal = {ACM Transactions on Graphics (Proceedings of ACM SIGGRAPH)},
  year    = {2013},
  volume  = {32},
  number  = {4},
  pages   = {140:1--140:8},
}

Abstract

We present a method to create high-quality sampling filters by combining a prescribed number of texels from several resolutions in a mipmap. Our technique provides fine control over the number of texels we read per texture sample so that we can scale quality to match a memory bandwidth budget. Our method also has a fixed cost regardless of the filter we approximate, which makes it feasible to approximate higher-order filters such as a Lanczos 2 filter in real-time rendering. To find the best set of texels to represent a given sampling filter and what weights to assign those texels, we perform a cardinality-constrained least-squares optimization of the most likely candidate solutions and encode the results of the optimization in a small table that is easily stored on the GPU. We present results that show we accurately reproduce filters using few texel reads and that both quality and speed scale smoothly with available bandwidth. When using four or more texels per sample, our image quality exceeds that of conventional trilinear filtering.

Supplemental

download pptx SIGGRAPH2013.pptx

The presentation that I gave at SIGGRAPH 2013.

download html comparison.html

Comparisons of results from our method versus trilinear filtering and the ground truth filter we approximate shown for a variety of images. We also show the result of our filter used in conjunction with anisotropic filtering.

download mp4 movie.mp4

A movie showing the lack of flickering artifacts under animation. We show a rotating plane with a photograph and checker pattern sampled with trilinear interpolation vesus with our method. For the checker, we also show the difference in quality when using different numbers of samples in the filter.

download zip resample_opengl.zip

Implementation of our texture filtering as an OpenGL shader program.

download zip optimize4.zip

Code that performs cardinality constrained optimization for different filter types and different numbers of samples. The program will output coefficient tables in C source code form for easy inclusion in other programs. Different numbers of subdomains can be used as well as up to quadratic polynomial fitting. You can also optionally calculate the error relative to trilinear filtering.

License

The images, executables, and code supplied are from the web page http://josiahmanson.com. These materials are free to use for non-commercial purposes. Any works that use materials from this web page should acknowledge Josiah Manson and the paper Cardinality-Constrained Texture Filtering. For commercial use, please contact Josiah Manson (josiahmanson@gmail.com).