摘要
为解决阴影体算法中软阴影绘制问题,提出了一种基于GPU构造阴影线的软阴影绘制算法,通过GPU构造遮罩体阴影线数据集,该数据集包含了阴线的起始点,终止点,遮罩值3个数据。在阴影遮罩值修正阶段,使用计算渲染管线(computer shader,CS)对数据集采用反距加权函数进行修正。在绘制受影体阶段根据遮罩体的阴影线数据集,采用三角插值计算出当前像素点的阴影值。实验证明,该算法能有效解决阴影体算法绘制软阴影问题,并且在满足实时渲染需求的同时能渲染出灵活可控过渡自然的软阴影。
To solve the problem of soft shadow rendering algorithm on shaded body surfaces, a new algorithm based on shadow lines which can render better soft shadow with less cost computation overhead is presented. GPU is used to create shadow lines which include starting point, ending point and shading value. The computer shader (CS) is used to amend the shading value by inverse distance weighting function. In the phase of shadow rendering, the shadow lines dataset is used to calculate the current pixel's shading value by trigonometric interpolation. Experimental result shows that the algorithm can solve the soft shadow rendering problem effectively. It can not only meet the needs of real-time rendering, but also give out the flexible and adjustable soft shadows.
作者
高山晓
吴献
Gao Shanxiao;Wu Xian(Fujian Normal University Faculty of Software, Fuzhou, 350108, china)
出处
《系统仿真学报》
CAS
CSCD
北大核心
2018年第4期1279-1286,共8页
Journal of System Simulation
基金
福建省自然科学基金青年创新项目(2012J05111)
福建省教育厅自然科学基金面上项目(JA12079)
福建师范大学教学改革研究项目(I201503039)
关键词
阴影体
几何着色器
计算渲染管线
软阴影渲染
shaded bodies
geometric shader
computer shader
soft shadow rendering