由于环境光源下的柔和阴影绘制需要针对每像素对来自全景方向的上千个光源进行昂贵的可见性计算,这给实时绘制带来了巨大的挑战.在消除预计算的前提下,提出了一种环境光源下动态场景全频阴影实时绘制算法.通过基于光照强度的环境图重要性采样、场景几何信息近似采样、阴影图预滤波、BRDF重要性采样等方法,实现了环境光源下动态场景的全频阴影及其环境映射绘制.实验表明,算法可满足环境光源、场景物体及其材质动态变化的要求,并可在保证实时绘制效率的前提下,取得近似于预计算算法的绘制质量.
Since accurate rendering of soft shadows under environment lighting requires expensive computation to determine visibility from each pixel to hundreds of lights along omnidirectional directions,it brings great challenge to real-time rendering algorithm.Algorithms based on precomputation can provide accurate,real-time solutions,but it is hard to extend to dynamic scenes.Besides they have some inherent problems,for example,they usually need too much time on precomputation,cost too much memory,and can only be applied to limited types of light,etc.This paper proposes an importance-sampling-based real-time algorithm for all-frequency shadows rendering in dynamic scenes,which does not require any precomputation.Firstly,we sample some important lights which are decisive to the soft shadows from environment map;secondly we simplify the scene by geometric sampling so that we can respectively create a shadow map for each sampled light using only one rendering pass;thirdly we approximate the shadow test by using exponential function;and finally we accelerate the calculation by BRDF based on importance sampling.As a result,we are able to realize the real-time rendering of all-frequency shadows and environment mapping of dynamic scenes.Experiments demonstrate that the algorithm can support dynamic environment lights,dynamic objects and dynamic BRDFs;meanwhile it also can achieve real-time rendering results which are comparable to PRT algorithm.