针对大规模场景的水面倒影及折射渲染的可见物体计算问题,提出一种完全基于GPU加速的区域潜在可视集合(PVS)的预计算方法.借助圆盘式水面和模板缓存来统计只在水面部分以倒影方式和折射方式渲染的几何像素值;通过调整计算速度和精度间的场景分割精度、最大误差等参数,缩短了PVS的计算时间.将PVS应用到水面倒影及折射图渲染中,并与已有水面渲染方法进行比较.针对不同场景的测试结果表明,采用文中方法可对常见场景中水面渲染可见物体的计算提供一个良好的解决方案,有效地减少了需要渲染的几何数据的数量,明显地提高了虚拟漫游时场景的渲染效率.
In order to compute the visible objects of reflection and refraction by water for a large-scale scene, a GPU-based preprocessing for potential visible set (PVS) is presented. A circle-surface water model and stencil buffer is selected to calculate the pixels on the rendered image from the reflection and refraction by water. The scene segmentation precision and the maximum error is adjusted according to the computation speed and the accuracy of the PVS, and the computational time of the PVS is shorter. The PVS algorithm is implemented in the water rendering of reflection and refraction and compared to previous algorithms. Experiment results on various scenes show that our algorithm can be used to provide a good solution for the calculation of the visible objects in general water simulation, to reduce the geometric data for the rendering, and enhance the rendering efficiency for the virtual navigation in a scene.