LocalSH (Fake Soft Shadows Using Precomputed Visibility Distance Functions)
A companion demo for ShaderX^3 article by Aras Pranckevicius.
The demo
Displays dynamic shadows in static scenes using that "Fake soft shadows..." technique. Has 5th and 2nd order SH shadows and a standard shadow-depth-map mode
for comparison. Allows moving viewer and lightsources and some other options.
Requirements
- DirectX 9.0b (or later) runtime.
- Graphics card that supports Pixel Shaders 2.0 and Vertex Shaders 1.1.
- Tested and seems to work on ATi Radeon 9500 and up; nVidia GeForce FX.
Usage
Run "LocalSH.exe" and try pressing keys and/or moving mouse:
- F1 - toggle key help (displays what's written here).
- Left mouse button and drag - rotate camera.
- Arrows or W/A/S/D - move camera.
- Q/E or PgUp/PgDn - camera up/down.
- F4 - toggle 'LocalSH' technique vs. standard shadowmaps.
- F5 - toggle between 5th and 2nd SH orders (25 or 4 coefficients respectively).
- Space - 'fire' a short lived lightsource.
- P - change active light, J/I/K/L - move active light, M - toggle active light animation.
- F3 - toggle wireframe; F2 - D3D device settings; Alt-Enter - toggle fullscreen; Alt-F4 - exit.
Other goodies
Author's homepage here.