vsm_demo

所属分类:3D图形编程
开发工具:Visual C++
文件大小:4554KB
下载次数:60
上传日期:2009-05-25 14:08:03
上 传 者miniant_ant
说明:  Variance Shadow Maps 实时软阴影程序代码demo
(Variance Shadow Maps in real-time soft shadow demo code)

文件列表:
Demo.exe (724992, 2006-05-02)
FwSimpleTexture.hpp (1542, 2006-02-26)
glew32.dll (188416, 2005-10-12)
GlFBOCache.cpp (2262, 2005-11-26)
GlFBOCache.hpp (2008, 2005-11-26)
GlFramebufferObject.cpp (3024, 2006-04-04)
GlFramebufferObject.hpp (3639, 2006-04-03)
jpeg.dll (169443, 2006-04-03)
libpng13.dll (126976, 2006-04-03)
libsh.dll (1007616, 2006-05-01)
libsharb.dll (319488, 2006-05-01)
libshglsl.dll (303104, 2006-05-01)
main.cpp (2043, 2006-02-26)
media (0, 2006-05-02)
media\Beast.3ds (185093, 2005-10-11)
media\Beast_1.png (1255180, 2005-10-31)
media\Beast_2.png (309050, 2005-10-31)
media\brick_texture1.png (1910466, 2005-11-18)
media\GroundPlane.3ds (998, 2005-11-18)
media\SpotLight.3ds (1856, 2005-10-11)
PCFDepth.cpp (1437, 2006-04-03)
PCFDepth.hpp (788, 2006-02-26)
PCFSpotLight.cpp (5264, 2006-03-11)
PCFSpotLight.hpp (3289, 2006-05-02)
postbuild_vsm.bat (131, 2006-04-03)
PostProcessEffect.cpp (1631, 2005-10-12)
PostProcessEffect.hpp (3117, 2005-10-12)
PPGaussianBlur.hpp (4038, 2005-10-12)
SDL.dll (237568, 2006-01-06)
SDL_image.dll (40960, 2006-01-06)
SGSpaPCFLight.cpp (3479, 2006-02-26)
SGSpaPCFLight.hpp (1726, 2006-05-02)
SGSpaVSMLight.cpp (4234, 2006-05-02)
SGSpaVSMLight.hpp (2073, 2006-05-02)
SGTraPCFLight.hpp (1523, 2006-05-02)
SGTraVSMLight.hpp (1596, 2006-05-02)
VSM.cpp (16569, 2006-05-02)
VSM.hpp (2535, 2006-05-02)
VSM.sln (870, 2006-04-03)
... ...

Variance Shadow Maps Demo Copyright 2006 by Andrew Lauritzen and William Donnelly DISCLAIMER ========== This demo and source is provided AS-IS and we take no responsability for anything that it does to your computer, your life, etc. Use it at your own risk. DEMO ==== The demo requires a Radeon 9500, Geforce 6 or newer with the latest drivers (must have EXT_framebuffer_object support for one). Simply execute the "Demo.exe" application from the root directory. A few useful keys: Left drag - Camera orbit Right drag - Camera pan Middle drag - Camera zoom Escape - Exit Space - Toggle pause light animation F5 - Use percentage closer filtering F6 - Use bilinear percentage closer filtering F7 - Use variance shadow maps with 16-bit fixed point buffer F8 - Use variance shadow maps with 16-bit floating point buffer F9 - Use variance shadow maps with 32-bit floating point buffer S - Step through shadow maps sizes 0 to 5 - Set blur size (0 = disable) L - Toggle second light SOURCE ====== The source is not particularly easy to compile. It requires Visual C++ 2005 (Express is fine) and several external libraries. Most notably: 1) Sh GPU Metaprogramming Language (compiled using 0.8 release - SVN at http://svn.libsh.org/sh/branches/0.8/) 2) Sheen scene graph library (compiled using r3569 from SVN at http://svn.libsh.org/game/trunk/) 3) SDL (compiled using version 1.2 available from http://www.libsdl.org/) 4) GLEW (available from http://glew.sourceforge.net/) NOTES ===== 1) The PCF implementation exhibits some "peter panning": the biasing is overly aggressive to avoid self-shadowing when used with large blur kernels. This is better handled by biasing based on the z-slope of the polygon. However I didn't have time to make this work well on both ATI and NVIDIA (derivatives seem to differ somewhat) so it is disabled for now. 2) The bilinear PCF implementation is non-optimal in that it takes redundant texture samples. Some of this will probably get filtered out by the shader compiler, but it could be done better at the high level. In any case, it was convenient for implementation time reasons to use the readily-available bilinear_lookup function. 3) Some stuff is somewhat "hacked"... remember that this is primarily a RESEARCH impelementation so there's extra stuff and non-optimal code for our research purposes. It is useful as a reference, but by no means should the code be directly lifted into a production environment. Enjoy!

近期下载者

相关文件


收藏者