I have updated the Volumetric Shadow (Tech)Demo (formerly know as the "Stencil Shadow Demo" and later "Volume Shadow Demo".)
For now, this will be the final version, although I might release some updates when needed.
A more advanced project (VSD 2.0), which will take VSD's place in the future, is already being developed.
Back on topic: VSD is compatible with most, if not all DLDI devices.
Emulators (as far as they emulate used features) and older SLOT2 GBA NOR (without any SD or CF card storage) cartridges are supported via FCSR (build available on the site.)
The demo shows how to use a bunch of NDS features and some otherwise handy lines of source code, like:
- Hardware accelerated volumetric shadowing - mini-tutorial included!
- Motion blur with video capture, using only one VRAM bank, at 60 FPS
- Hardware lighting, texturing, fogging, antialiasing etc.
- Display brightness control
- Viewport scissoring (thanks to gabebear)
- Loading binary and text files from disk
- Converting 24/32bit .tga image data to 16bit NDS textures
- Displaying a custom font and a text area over a background image, all loaded from disk
- Smooth touch input
- Simple frame rate counting and renderer status display
Please, make sure you read the contents of the included readme file!
A mini-tutorial on volumetric shadows comes with the source release (as well as at here in the forum) and some additional information (e.g. on the .tga format) is "hidden" in the source files. ;^)
Since the initial release, I have reworked the sources a lot! There have been quite some rewrites and a lot of renaming and rearranging!
Now all data should be put into ROOT/data/vsd_data, then the demo can be run from any folder!
It was developed and build with devkitARM R23b, libnds 20071023 and libfat 20070127.
It's quite readable, stable (I guess) and relatively easy to understand!
Download it from: www.robs-basement.de
As always, I released the sources along with binary builds. I only supply a DLDI .nds and an FCSR .nds, as I don't think anybody needs a .gba any more (I don't) and the few people who do need it, can easily convert it themselves... But in case that assumption is wrong, please let me know and I'll upload a .gba to the web site.
Note, that there are some implementations and data structures I don't recommend using in "serious" programs, but for the sake of simplicity, I used them in this demo (e.g. the triangle structure.)
This "issue" will be addressed in the next major release - VSD 2.0, which is already being worked on.
The shadow in the demo is static, that means it's not deforming (but could be moved around freely) - it's up to you to implement dynamic shadows.
Feel free to comment - just make sure you read the readme first! ;^)
(Keep in mind, that the demo is my first publicly released open source software. :^) )
Anyways, I hope this demo will be useful to at least some of you. Don't hesitate to tell me about it! :^D
Finally, I want to thank everybody in this forum who's helped me making the jump from GBA to NDS!
Very special thanks go out to Brandon M. and Larry E. for helping me out with the hardware and gabebear for sharing his viewport scissoring implementation.
Thank you for reading and have a nice day! :^)