摘要
三维地形可视化是自然环境仿真的重要组成部分,以VS2010+XNA4.0为开发平台进行三维地形的绘制。其方法是加载高度图生成网格的顶点和索引;将网格数据放入GPU中进行地形渲染,并对GPU的顶点渲染和像素渲染两个阶段进行编程,使用法线映射进行贴图,生成带纹理和光照的三维地形。
3D terrain visualization is one important part of nature environment simulation.A method was given to render 3D terrain base on VS2010 and XNA4.0 in this paper. First of all,verteces of grids and indeces were created by loading height map. And then,data of grids was put into GPU for terrain rendering.At the same time, vertex rendering and pixel rendering were pro- grammed on GPU, and normal mapping was used to texture in this stage.Finally, 3D terrain with texture and lighting was created.
出处
《电脑编程技巧与维护》
2013年第14期78-80,共3页
Computer Programming Skills & Maintenance