# Approximate Program Smoothing Using Mean-Variance Statistics, with   Application to Procedural Shader Bandlimiting

**Authors:** Yuting Yang, Connelly Barnes

arXiv: 1706.01208 · 2017-06-06

## TL;DR

This paper presents a compiler-based method for approximating Gaussian smoothing of programs using mean-variance statistics, enabling effective procedural shader bandlimiting with improved visual quality.

## Contribution

It introduces a novel adaptive Gaussian approximation and a compiler framework that automatically selects the best smoothing approximations for shader programs.

## Key findings

- The method outperforms previous smoothing approaches numerically.
- Smoothed shaders show improved aesthetic quality.
- The adaptive Gaussian approximation is accurate and mathematically smooth.

## Abstract

This paper introduces a general method to approximate the convolution of an arbitrary program with a Gaussian kernel. This process has the effect of smoothing out a program. Our compiler framework models intermediate values in the program as random variables, by using mean and variance statistics. Our approach breaks the input program into parts and relates the statistics of the different parts, under the smoothing process. We give several approximations that can be used for the different parts of the program. These include the approximation of Dorn et al., a novel adaptive Gaussian approximation, Monte Carlo sampling, and compactly supported kernels. Our adaptive Gaussian approximation is accurate up to the second order in the standard deviation of the smoothing kernel, and mathematically smooth. We show how to construct a compiler that applies chosen approximations to given parts of the input program. Because each expression can have multiple approximation choices, we use a genetic search to automatically select the best approximations. We apply this framework to the problem of automatically bandlimiting procedural shader programs. We evaluate our method on a variety of complex shaders, including shaders with parallax mapping, animation, and spatially varying statistics. The resulting smoothed shader programs outperform previous approaches both numerically, and aesthetically, due to the smoothing properties of our approximations.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1706.01208/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/1706.01208/full.md

## References

45 references — full list in the complete paper: https://tomesphere.com/paper/1706.01208/full.md

---
Source: https://tomesphere.com/paper/1706.01208