Current Issue Cover
深度剥离与GPU结合的近似软影算法

(1.中国科学院软件研究所计算机科学国家重点实验室,北京 100190;2.中国科学院研究生院,北京 100049;3.澳门大学科学技术学院电脑与资讯科学系,澳门)

摘 要
针对基于阴影图算法扩展的一些近似软影算法中存在的只考虑外半影区而导致的本影区过多估计的问题,提出了一种深度剥离与GPU结合的近似软影实时绘制算法。算法利用GPU的几何着色器来提取场景物体的轮廓边并生成内半影和外半影图元,进而得到整个内外半影颜色图和深度图,最终阴影绘制的时候通过参考阴影图和内外半影图来确定每个可见像素的明暗值,从而得到比以往算法较真实的绘制效果,算法完全在GPU中实现。实验结果表明,对相对不复杂的场景,该算法可以生成较真实的软影效果,且绘制帧率完全达到实时。
关键词
Approximate soft shadow algorithm based on depth peeling and GPU

sunmingyan1,2, lvweiwei1,2, liuxuehui1, wuenhua3,4(1.State Key Laboratory of Computer Science,Institute of Software,Chinese Academy of Sciences,Beijing 100190;2.Graduate University of Chinese Academy of Sciences,Beijing 100049;3.State Key Laboratory of Computer Science,Institute of Software,Chinese Academy of Sciences;4.Department of Computer and Information Science,Faculty of Science and Technology,University of Macau.Macao)

Abstract
To deal of umbra overestimation in some current soft shadow algorithms considering only the outer penumbra effects extended from traditional shadow mapping, a real-time approximating algorithm for plausible soft shadows based on depth peeling is proposed. The algorithm extracts the scene silhouette edges in geometry shader and generates the inner and outer penumbra primitives respectively through the silhouette edges. In the final rendering pass, the shading of each pixel is decided by referring to the shadow map and penumbra map, and plausible soft shadow effect which is more realistic than the results of previous methods is finally simulated. This algorithm runs entirely on GPU. Several experimental results show that, this algorithm generates more plausible soft shadows for relatively uncomplicated scenes than other methods and has real-time rendering speed.
Keywords

订阅号|日报