Stochastic sampling techniques are ubiquitous in real-time rendering, where performance constraints force the use of low sample counts, leading to noisy intermediate results. To remove this noise, the post-processing step of temporal and spatial denoising is an integral part of the real-time graphics pipeline. The main insight presented in this paper is that we can optimize the samples used in stochastic sampling such that the post-processing error is minimized. The core of our method is an analytical loss function which measures post-filtering error for a class of integrands - multidimensional Heaviside functions. These integrands are an approximation of the discontinuous functions commonly found in rendering. Our analysis applies to arbitrary spatial and spatiotemporal filters, scalar and vector sample values, and uniform and non-uniform probability distributions. We show that the spectrum of Monte Carlo noise resulting from our sampling method is adapted to the shape of the filter, resulting in less noisy final images. We demonstrate improvements over state-of-the-art sampling methods in three representative rendering tasks: ambient occlusion, volumetric ray-marching, and color image dithering. Common use noise textures, and noise generation code is available at https://github.com/electronicarts/fastnoise.
翻译:随机采样技术在实时渲染中广泛应用,但性能限制迫使样本数量偏低,导致中间结果存在噪声。为消除该噪声,时空去噪的后处理环节已成为实时图形管线的核心组件。本文提出的核心观点是:通过优化随机采样中的样本分布,可使后处理误差最小化。本方法的核心是构建一个解析损失函数,用于度量特定被积函数族(多维Heaviside函数)的滤波后误差。该被积函数族是对渲染中常见的不连续函数的一种近似。我们的分析适用于任意空间滤波器和时空滤波器、标量及矢量样本值、均匀与非均匀概率分布。研究表明,本采样方法产生的蒙特卡洛噪声谱会自动适配滤波器的形态,从而生成噪声更低的最终图像。在环境光遮蔽、体素光线步进和彩色图像抖动三项典型渲染任务中,我们验证了该方法相比当前最先进采样方法的优势。常用噪声纹理与噪声生成代码已开源至 https://github.com/electronicarts/fastnoise。