摘要
针对虚拟现实系统中的景深模拟问题,提出了一种改进的基于图形处理器(GPU)的后处理景深模拟算法。该算法在场景渲染时将全分辨率纹理图存入离屏缓存区,利用该离屏缓存区的Alpha通道输出每个像素的线性化深度信息;对这个全渲染的场景纹理图作下采样处理,得到原图像1/16大小的图像;对下采样后的场景纹理进行可分离二维高斯滤波,生成模糊的场景纹理图;通过泊松采样方法,在弥散圈内将两幅纹理图基于线性化深度信息进行融合,模拟出了景深效果。最后将该算法应用于一个海上搜救虚拟现实系统。实验结果表明,所提算法较好地仿真了景深效果,改善了传统后处理滤波算法的深度连续性差、亮度扩散等问题,并能满足实时交互需求。
In order to solve the problem of rendering Depth Of Field( DOF) in Virtual Reality( VR) system, an improved post-processing algorithm of DOF based on Graphics Processing Unit( GPU) was proposed. First, the scene at full resolution was rendered to an offscreen buffer, and the linear depth of each pixel was output to the alpha channel of the buffer.Then, the fully-rendered scene was downsampled into 1 /16 of the original size. Next, the downsampled scene was blurred by running the image through two passes of a separable Gaussian filter, and stored as a texture. Finally, the two textures were blended according to the linear depth of each pixel in the size of Circle of Confusion( Co C). The algorithm was applied in a virtual roaming scene and a good simulation of real-time DOF effect was achieved. The experimental results show that the algorithm has improved some problems in the traditional post-processing filter algorithm, such as poor continuity and brightness diffusion, and it meets the demand of real-time interaction in VR.
出处
《计算机应用》
CSCD
北大核心
2015年第5期1439-1443,共5页
journal of Computer Applications
基金
国家自然科学基金资助项目(61171126)
上海重点支撑项目(12250501500)
交通运输部应用基础研究项目(2014329810060)
上海市自然科学基金资助项目(14ZR1419700)
上海高校青年教师培养资助计划项目(ZZshhs13024)
关键词
景深模拟
线性化深度
下采样
实时性
虚拟现实
Depth Of Field (DOF)
linear depth
downsampling
real-time performance
Virtual Reality (VR)