bumpmap

所属分类:OpenGL
开发工具:Visual C++
文件大小:255KB
下载次数:61
上传日期:2012-08-31 21:29:06
上 传 者legendsoft
说明:  使用OPENGL进行凹凸纹理贴图渲染的例子,很好的学习OPENGL的例子.
(OPENGL example of bump texture map rendering, good learning OPENGL example.)

文件列表:
Bump Mapping (0, 2006-08-29)
Bump Mapping\Bump Mapping.exe (196608, 2006-08-29)
Bump Mapping\decal vertex program.txt (517, 2006-08-29)
Bump Mapping\Decal.bmp (3126, 2006-08-29)
Bump Mapping\diffuse decal vertex program.txt (730, 2006-08-29)
Bump Mapping\diffuse vertex program.txt (690, 2006-08-29)
Bump Mapping\extensions (0, 2006-08-29)
Bump Mapping\extensions\ARB_multitexture_extension.cpp (7638, 2006-08-29)
Bump Mapping\extensions\ARB_multitexture_extension.h (2802, 2006-08-29)
Bump Mapping\extensions\ARB_texture_cube_map_extension.cpp (2538, 2006-08-29)
Bump Mapping\extensions\ARB_texture_cube_map_extension.h (685, 2006-08-29)
Bump Mapping\extensions\EXT_compiled_vertex_array_extension.cpp (2151, 2006-08-29)
Bump Mapping\extensions\EXT_compiled_vertex_array_extension.h (853, 2006-08-29)
Bump Mapping\extensions\EXT_texture_edge_clamp_extension.cpp (1802, 2006-08-29)
Bump Mapping\extensions\EXT_texture_edge_clamp_extension.h (727, 2006-08-29)
Bump Mapping\extensions\NV_register_combiners_extension.cpp (4479, 2006-08-29)
Bump Mapping\extensions\NV_register_combiners_extension.h (1685, 2006-08-29)
Bump Mapping\extensions\NV_texture_shader_extension.cpp (1752, 2006-08-29)
Bump Mapping\extensions\NV_texture_shader_extension.h (697, 2006-08-29)
Bump Mapping\extensions\NV_vertex_program_extension.cpp (13015, 2006-08-29)
Bump Mapping\extensions\NV_vertex_program_extension.h (4650, 2006-08-29)
Bump Mapping\FPS_COUNTER.cpp (1020, 2006-08-29)
Bump Mapping\FPS_COUNTER.h (949, 2006-08-29)
Bump Mapping\gloss.tga (66843, 2006-08-29)
Bump Mapping\IMAGE.cpp (25703, 2006-08-29)
Bump Mapping\IMAGE.h (1620, 2006-08-29)
Bump Mapping\License.txt (1494, 2006-08-29)
Bump Mapping\LOG.cpp (2103, 2006-08-29)
Bump Mapping\LOG.h (840, 2006-08-29)
Bump Mapping\look up specular vertex program.txt (864, 2006-08-29)
Bump Mapping\Main.cpp (30534, 2006-08-29)
Bump Mapping\Main.h (977, 2006-08-29)
Bump Mapping\Maths (0, 2006-08-29)
Bump Mapping\Maths\COLOR.cpp (1284, 2006-08-29)
Bump Mapping\Maths\COLOR.h (3935, 2006-08-29)
Bump Mapping\Maths\Maths.h (876, 2006-08-29)
Bump Mapping\Maths\MATRIX4X4.cpp (25021, 2006-08-29)
Bump Mapping\Maths\MATRIX4X4.h (4884, 2006-08-29)
Bump Mapping\Maths\PLANE.cpp (2446, 2006-08-29)
Bump Mapping\Maths\PLANE.h (2166, 2006-08-29)
... ...

************************************************************************** ** Bump Mapping ** ** www.paulsprojects.net ** ** paul@paulsprojects.net ************************************************************************** Description: This demo draws a torus lit by a single light. The following equation is evaluated per fragment in tangent space: Color=(N'.L)*Decal + [(N'.H)^Power]*Gloss where: N' is the normal from the normal map L is the vector to the light Decal is the texture color H is the halfway vector Power is the specular power Gloss allows per-fragment coloring of the specular component This is performed using NV_register_combiners. Method 1 To evaluate the equation in a single pass, all 4 texture units and 8 general combiners of a Geforce3 or above are used. The specular exponent is 16, and is calculated by successive squaring in the combiners. Method 2 Improved specular highlights are acheived by using the Geforce 3 or above's NV_texture_shader functionality to do a dot-product dependent look up into a specular ramp texture, again with exponent 16. The diffuse and decal are applied in another pass. However, as normalisation of the half way vector is not performed, this technique is not as good for coarsely tesselated geometry. Method 3 In order to evaluate the equation using only the 2 general combiners and 2 texture units of a Geforce 1/2, three passes are performed. Requirements: EXT_compiled_vertex_array ARB_multitexture NV_register_combiners NV_vertex_program Required for Higher Quality bump mapping: At least 4 general combiners for NV_register_combiners At least 4 texture units NV_texture_shader References: "Per-Pixel Lighting", Philip Taylor. From msdn.microsoft.com "Texture Compositing with Register Combiners", John Spitzer. From developer.nvidia.com Keys: F1 - Take a screenshot Escape - Quit F - Draw smooth torus B - Use bump map P - Pause U - Unpause 1 - Use method 1 (4 general combiners, single pass) 2 - Use method 2 (NV_texture_shader) 3 - Use method 3 (Geforce 2 fallback)

近期下载者

相关文件


收藏者