摘要
针对顶点着色器细分地形网格需要额外生成模板、计算细分层次复杂的不足,提出了一种利用细分着色器进行地形网格细分的层次细节(LOD)地形渲染算法。利用分块四叉树组织建立地形粗糙网格的分层结构,以LOD判别函数对活动地形块进行筛选;提出了在细分控制着色器中基于视点三维连续距离的细分因子计算方法,并针对外部细分因子进行处理消除了裂缝;实现在细分计算着色器上的置换贴图,对精细网格的高度分量进行位移。而且将四叉树结构存储至顶点缓冲区,减少中央处理器(CPU)与图形处理器(GPU)的资源交换;引入细分队列加速细分过程。实验证明,该算法具有平滑的细节层次过渡和良好的细分效果,能够有效提高GPU利用率和地形渲染效率。
The vertex shader needs an extra generating pattern and the calculation of subdivision level is complicated when subdividing terrain grid. A Level of Detail (LOD) terrain rendering algorithm using subdivision shader was put forward for the insufficiency. The proposed method used block quad tree organization to build a rough terrain grid hierarchical structure, and filtrated the activity terrain blocks by LOD discrimination function. A subdivision factor calculation method was proposed based on viewpoint in a three-dimensional continuous distance in tesseUation control shader and cracks of the external factor segment was eliminated. As a result, displacement mapping on tessellation evaluation shader and displacement of height component in fine grid blocks were achieved. Meanwhile, the quadtree was saved to vertex buffer, and the exchange of resource between Central Processing Unit (CPU) and Graphic Processing Unit (GPU) was decreased. The subdivision process was accelerated by bringing in subdivision queue. The experimental results show that the proposed algorithm has a smooth detail level transition and good subdivision effect, and it can increase the utilization ratio of GPU and terrain rendering efficiency.
出处
《计算机应用》
CSCD
北大核心
2015年第6期1716-1719,1729,共5页
journal of Computer Applications
基金
国家自然科学基金资助项目(70971137)
国家科技部"十二五"支撑项目(2001BAK07B04)
关键词
细分着色器
分块四叉树
置换贴图
细分队列
图形处理器
tessellation shader
block quad tree
displacement mapping
subdivision queue
Graphic Processing Unit (GPU)