Table of Contents
Fetching ...

Improved Stochastic Texture Filtering Through Sample Reuse

Bartlomiej Wronski, Matt Pharr, Tomas Akenine-Möller

TL;DR

This work tackles aliasing and interpolation issues that arise when magnifying textures filtered with stochastic texture filtering (STF). By sharing texel samples across neighboring screen pixels using GPU wave intrinsics and a weighted importance sampling (WIS) estimator, the method achieves higher fidelity magnified textures without increasing texture fetch cost. Key contributions include a novel STF estimator that remains within the convex hull of texel values, sharing footprints (square and pseudorandom sparse) for cross-lane texel reuse, and blue-noise mask adaptations to support reuse patterns. The approach yields substantial PSNR gains (over 10 dB at high magnification) and improves visual quality both with and without spatiotemporal denoising, while maintaining compatibility with existing shading and compression workflows. Practical implications include better integration with neural texture compression and reduced reliance on post-processing denoisers, enabling higher-quality real-time rendering with modest per-frame overhead.

Abstract

Stochastic texture filtering (STF) has re-emerged as a technique that can bring down the cost of texture filtering of advanced texture compression methods, e.g., neural texture compression. However, during texture magnification, the swapped order of filtering and shading with STF can result in aliasing. The inability to smoothly interpolate material properties stored in textures, such as surface normals, leads to potentially undesirable appearance changes. We present a novel method to improve the quality of stochastically-filtered magnified textures and reduce the image difference compared to traditional texture filtering. When textures are magnified, nearby pixels filter similar sets of texels and we introduce techniques for sharing texel values among pixels with only a small increase in cost (0.04--0.14~ms per frame). We propose an improvement to weighted importance sampling that guarantees that our method never increases error beyond single-sample stochastic texture filtering. Under high magnification, our method has >10 dB higher PSNR than single-sample STF. Our results show greatly improved image quality both with and without spatiotemporal denoising.

Improved Stochastic Texture Filtering Through Sample Reuse

TL;DR

This work tackles aliasing and interpolation issues that arise when magnifying textures filtered with stochastic texture filtering (STF). By sharing texel samples across neighboring screen pixels using GPU wave intrinsics and a weighted importance sampling (WIS) estimator, the method achieves higher fidelity magnified textures without increasing texture fetch cost. Key contributions include a novel STF estimator that remains within the convex hull of texel values, sharing footprints (square and pseudorandom sparse) for cross-lane texel reuse, and blue-noise mask adaptations to support reuse patterns. The approach yields substantial PSNR gains (over 10 dB at high magnification) and improves visual quality both with and without spatiotemporal denoising, while maintaining compatibility with existing shading and compression workflows. Practical implications include better integration with neural texture compression and reduced reliance on post-processing denoisers, enabling higher-quality real-time rendering with modest per-frame overhead.

Abstract

Stochastic texture filtering (STF) has re-emerged as a technique that can bring down the cost of texture filtering of advanced texture compression methods, e.g., neural texture compression. However, during texture magnification, the swapped order of filtering and shading with STF can result in aliasing. The inability to smoothly interpolate material properties stored in textures, such as surface normals, leads to potentially undesirable appearance changes. We present a novel method to improve the quality of stochastically-filtered magnified textures and reduce the image difference compared to traditional texture filtering. When textures are magnified, nearby pixels filter similar sets of texels and we introduce techniques for sharing texel values among pixels with only a small increase in cost (0.04--0.14~ms per frame). We propose an improvement to weighted importance sampling that guarantees that our method never increases error beyond single-sample stochastic texture filtering. Under high magnification, our method has >10 dB higher PSNR than single-sample STF. Our results show greatly improved image quality both with and without spatiotemporal denoising.

Paper Structure

This paper contains 30 sections, 20 equations, 17 figures, 1 table.

Figures (17)

  • Figure 1: An example of a 32 lane wave: eight $2\times 2$ quads configured as $8\times 4$ pixels. The numbers are lane ids, configured for linear row ordering. Each pixel corresponds to a lane in the wave, and it can access a value of the other wave lanes using WaveReadLaneAt().
  • Figure 2: Quads with the current pixel marked with a circle. The values accessed by QuadReadAcrossX/Y/Diagonal() are marked X, Y, and D.
  • Figure 3: Reconstruction filters for two adjacent pixels in 1D. Texel locations are on the $x$-axis. When pixel 1 samples texel $t_1$ from the distribution $p_1$ according to its texture reconstruction filter and then shares it with pixel 0, the standard MC importance sampling estimator weights this texel $f_0 / p_1 \approx 20$ causing a variance spike, even for constant filtered signals.
  • Figure 4: From left to right: reference bilinear filtering, our WIS estimator, our WIS estimator with exact filtering, and exact filtering with equal sampling probabilities of texels inside of the filter footprint. The rightmost image shows a much higher percentage of pixels using exact filtering at the cost of severe visual artifacts, mostly visible at bilinear filter footprint boundaries.
  • Figure 5: Examples of $2\times 2$ footprints for waves of size 16, configured as $4\times 4$ lanes. A texel sharing footprint consists of a yellow lane, which is the lane whose filtered value we want to compute, together with a set of texel samples from dark green lanes. Top: using quad intrinsics the footprints are restricted by the API to have the upper left coordinates of a quad be even in $x$ and $y$. All lanes in each quad filter the same texel values. Under high magnification, $2\times 2$ regions produce almost identical color after stochastic filtering, illustrated by the colored pattern at the right. Bottom: using wave intrinsics, the $2\times 2$ footprints have more degrees of freedom in that they can be placed anywhere inside the wave. The sharing pattern visualization at the right has fewer regions of similar color, resulting in less spatial correlation.
  • ...and 12 more figures