Game Programming Gems 2

所属分类:游戏
开发工具:Visual C++
文件大小:46527KB
下载次数:263
上传日期:2005-07-29 16:01:54
上 传 者管理员
说明:  游戏编程精华02-含有几十个游戏编程例子
(game programing selection02 there are tens of examples about game programming.)

文件列表:
Game Programming Gems 2\01 General Programming\01 Kirmse\Cache.h (3919, 2001-06-09)
Game Programming Gems 2\01 General Programming\01 Kirmse (0, 2005-07-29)
Game Programming Gems 2\01 General Programming\03 Llopis\3DObject.cpp (667, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\3DObject.h (670, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\GameObject.cpp (526, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\GameObject.h (668, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\Generic3DObject.h (548, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\IRenderable.h (492, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\SoundSystem.h (584, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\SoundSystemFactory.cpp (1050, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\SoundSystemFactory.h (652, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis\SoundSystemSoftware.h (703, 2001-06-09)
Game Programming Gems 2\01 General Programming\03 Llopis (0, 2005-07-29)
Game Programming Gems 2\01 General Programming\04 Marselas\MyApplicationClass4.h (586, 2001-06-09)
Game Programming Gems 2\01 General Programming\04 Marselas\MyExportedClass1.h (802, 2001-06-09)
Game Programming Gems 2\01 General Programming\04 Marselas\MyExportedClass2.h (957, 2001-06-09)
Game Programming Gems 2\01 General Programming\04 Marselas\MyExportedClass3.h (969, 2001-06-09)
Game Programming Gems 2\01 General Programming\04 Marselas\MyExportedClass4.h (830, 2001-06-09)
Game Programming Gems 2\01 General Programming\04 Marselas\MyExportedFunction.h (635, 2001-06-09)
Game Programming Gems 2\01 General Programming\04 Marselas (0, 2005-07-29)
Game Programming Gems 2\01 General Programming\05 Marselas\DirectInput1.cpp (629, 2001-06-09)
Game Programming Gems 2\01 General Programming\05 Marselas\DirectInput2.cpp (1151, 2001-06-09)
Game Programming Gems 2\01 General Programming\05 Marselas\KernelLoad.cpp (1098, 2001-06-09)
Game Programming Gems 2\01 General Programming\05 Marselas (0, 2005-07-29)
Game Programming Gems 2\01 General Programming\06 Wakeling\CChildClass.h (972, 2001-03-11)
Game Programming Gems 2\01 General Programming\06 Wakeling\CdtiBin.h (2418, 2001-03-11)
Game Programming Gems 2\01 General Programming\06 Wakeling\CRootClass.h (1020, 2001-03-11)
Game Programming Gems 2\01 General Programming\06 Wakeling\dti.cpp (3281, 2001-05-02)
Game Programming Gems 2\01 General Programming\06 Wakeling\dtiClass.cpp (1340, 2001-03-11)
Game Programming Gems 2\01 General Programming\06 Wakeling\dtiClass.h (1154, 2001-03-11)
Game Programming Gems 2\01 General Programming\06 Wakeling (0, 2005-07-29)
Game Programming Gems 2\01 General Programming\07 Cafrelli\gems.cpp (1410, 2001-06-09)
Game Programming Gems 2\01 General Programming\07 Cafrelli\gems.dsp (4726, 2001-04-28)
Game Programming Gems 2\01 General Programming\07 Cafrelli\gems.dsw (531, 2001-02-26)
Game Programming Gems 2\01 General Programming\07 Cafrelli\gems.ncb (66560, 2001-06-09)
Game Programming Gems 2\01 General Programming\07 Cafrelli\gems.opt (52736, 2001-06-09)
Game Programming Gems 2\01 General Programming\07 Cafrelli\gems.plg (1781, 2001-06-09)
Game Programming Gems 2\01 General Programming\07 Cafrelli\HashTable.h (4760, 2001-06-09)
Game Programming Gems 2\01 General Programming\07 Cafrelli\Property.cpp (4912, 2001-06-09)
Game Programming Gems 2\01 General Programming\07 Cafrelli\Property.h (5389, 2001-06-09)
... ...

Texture Masking Demo 20/3/2001 This demo shows the benefits to be had from the texture masking technique. Briefly, the demo uses the graphics hardware to generate a texture map representing the intensity of a lens flare. This texturemap is then modulated with the lens flare to attenuate it depending upon how occluded the sun is in the world. The demo lets you switch between Texture Masking and Locking the frame buffer - the more traditional way of doing this effect. Note that there is a substantial win (as much as 2x on my system) from using the texture masking technique. The win is also improved the larger the size of the framebuffer. Note also that the lock method and the texture masking technique do not necessarily set exactly the same occlusion, so the intensity of the flare may vary from one technique to the other. They could be brought more closely together with effort, but they are fundamentally different techniques. Note that on some systems it may not be possible to lock the buffer at all (this is certainly true if you run the demo with antialiasing turned on). In this case the demo will detect it and switch back to Texture Masking - another compelling reason for using Texture Masking! Because this method is designed to increase parallelism between the GPU and the CPU, it works best on hardware with built in Transform and Lighting. Additional menu options let you see the intensity and sun maps, as well as disable the reads during the locking method. With this option you can see the difference in performance hit between simply locking the framebuffer and locking and reading the framebuffer. The sun map represents the visible sun pixels. The intensity map represents the calculated intensity value. Drive the demo like so: Left Mouse + Mouse Move = Rotate viewer CTRL + Left Mouse + Mouse Move = Walk viewer SHIFT + Left Mouse + Mouse Move = Strafe viewer Page Up = Increase CPU work Page Down = Decrease CPU work Note that as you move the lens flare should flicker in the correct way. To analyse the cost of the lock on system parallelism, do the following: 1. Disable the read during the lock from the menu 2. Set the texture masking method. 3. Increase the CPU work until the framerate just starts to drop 4. Switch to the lock method. Note the large drop in framerate as the CPU work is no longer serialized. To analyse the cost of the whole lock method versus the Texture Masking method: 1. Ensure reads are on during lock. 2. Switch between the two methods. Please let me know if you have any problems running or compiling the demo. Regards, Chris Maughan NVIDIA Corporation (cmaughan@nvidia.com)

近期下载者

相关文件


收藏者