GPUGeometryClipmaps

所属分类:OpenGL
开发工具:Visual C++
文件大小:5KB
下载次数:106
上传日期:2006-03-05 18:58:00
上 传 者2pgogocom8805
说明:  我们使用同一个vertex shader来渲染之前描述的所有2D footprint。首先,对于给定的footprint坐标(x,y)来说,shader通过简单的缩放和变换来计算它的世界坐标(x,y)。接下来,从顶点纹理中读取高度值z。这里不需要任何过滤器,因为顶点和纹理采样是一一对应的
(we use with a vertex shader to exaggerate the description before all 2D footprint. First, the footprint to the coordinates (x, y), the shader by simple scaling and transform to calculate its world coordinates (x, y). Next, from the vertex texture read height z values. This does not require any filters, because vertex and texture sampling is one-to-one)

文件列表:
Resource\ComputeNormals.fx (2897, 2005-01-12)
Resource\Render.fx (3498, 2005-01-12)
Resource\Upsample.fx (4272, 2005-01-12)
Resource (0, 2006-01-20)

This directory contains sample code for the article "Terrain Rendering Using GPU-Based Geometry Clipmaps. Included files: Render.fx This file contains the HLSL (both vertex and pixel shader) code for clipmap rendering. The vertex shader reads the z value from an elevation map stored as a vertex texture. It then computes a blending parameter and blends the geometry at the outer boundary of each level to ensure smooth transitions. The pixel shader accesses the normal map and shades the surface using a normal obtained by blending the fine and coarse level clipmap normals. For more details refer to Section 2.3.5 and 2.3.6 in the book. Upsample.fx This file contains HLSL code for creating/updating a clipmap elevation map. A tensor-product version of the well-known four-point subdivision curve interpolant, which has mask weights (-1/16, 9/16, 9/16, -1/16) is used to predict the finer level geometry from the coarser one. Next decompression residual/synthesized fractal noise is added to this predicted value to get the actual elevation which is written to the elevation map. For more details refer to Section 2.4 in the book. ComputeNormals.fx This file contains HLSL code for computing the normal map given the elevation map. The normal is computed as the cross product of two grid-aligned tangent vectors. A texture lookup is then done to gather the normal from the coarser level and pack both the computed normal for the current level and the normal from the coarser level into a four channel texture. For more details refer to Section 2.4.3 in the book.

近期下载者

相关文件


收藏者