VOLUMETRIC SHADOW DEMO 1.6.0 ============================ IMPORTANT: Be advised to read the disclaimer section of this file. 1) INTRODUCTION --------------- Thank you for trying this demo! The "Volumetric Shadow Demo" is an NDS graphics hardware technology demo, which is mainly targeted towards NDS developement beginners, who want to see how to use some of the NDS' graphics features. It was built with devkitARM R23b, libnds 20071023 and libfat 20070127 from the libnds "touch_look" example (as a project kick-start), so credit and thanks go out to their respective authors. Credit also goes to gabebear for his scissor pick matrix implementation. Very special thanks go out to Larry E. and Brandon M. for helping me out with the hardware! This demo and much more wouldn't have been possible without your help! Special thanks to tepples, simonjhall and Alphanoob! Also, greetings to everybody at the gbadev.org forums! NOTE: If you didn't download the demo (readme, tutorial, sources, binaries etc.) from the official site "www.code-basment.net", then it might be outdated! Please visit the aforementioned site and get the most up-to-date build from there. If you want to post about this demo on a news site, make sure to add a link to my site, so people can always get the most recent build as well as the source files. Thank you! FEATURES -------- The demo shows, among other things, how the following can be done: - Reading text and binary files with libfat, including routines for different file types, like .tga and some of my own, very basic formats - Using textures, lighting, viewport scissoring, the display brightness control register (9 levels used), fog, anti-aliasing, motion blur with capturing (using only one VRAM bank, at 60 FPS) - Displaying a custom font and a text area over a background image - Simple frame rate counting and display - Smooth touch input - And of course: hardware accelerated volumetric shadows NOTE: To see how such shadows are rendered, read the tutorial, which comes with the source release. Feel free to additionally read the source file comments. "tgaloader.cpp" includes some information about the .tga format. COMPATIBILITY ------------- In order to run this demo on hardware, copy the .nds file to the ROOT of your card. Except for the .nds file, all (data) files are located in the vsd_data directory. Copy it into [ROOT]/data/ or alternatively, directly into the ROOT. (ROOT means directly to the card, not into any directory.) Create the "data" directory, if not already present on your card. NOTE: Due to some file system and naming changes, this version is not compatible with older versions of the demo! Files that need to be copied: - vsd_###.nds (or vsd_###_fcsr.nds - in which case nothing else is needed) - doll.char - room.char - shadow.char - font.pbi - splash.pbi - loading.pbi - doll256.tga - test.tga Depending on your device, you may have to manually patch the .nds file to make it work with DLDI. Your card's manufacturer can help you with how to accomplish that. ATTENTION: To make it work with emulators and older SLOT2 GBA NOR devices (which don't use SD or CF cards) you need to use FCSR, which is easily found online. A link to a tutorial is available on my site. An FCSR build with an FAT image already appended is available for download off my site. FCSR builds do not work with DLDI devices! DLDI tested with M3Real. (Autopatched) FCSR testet with NeoFlash 512 Mb (NOR) and no$gba*. (No further patching after FCSR.) *) Other emulators are not supported. CONTROLS -------- Just as displayed during the demo itself: - Touch = look - D-Pad = move the camera (forward / backward) - A, B, X, Y = move the "character" - Start = reset scene - Select + A = toggle shadowing - Select + B = toggle texturing - Select + X = toggle lighting - Select + Y = toggle capturing ("motion blur") - R + D-Pad = move a scissor box - L + D-Pad = move the camera (up / down) - R + L + up / down = change the brightness - R + L + Start = reset the scene and the brightness DISCLAIMER ---------- Feel free to use the sources for whatever you like. I release the sources, the executables and data without any kind of warranty. Use them at your own risk! I am not reliable for any direct or indirect damage the usage or storage of (and any other action involving) the source files, executable or data might cause. (That, of course, should never happen! The demo wasn't designed to destroy anything!) The included example data are my own quite humble creations - please don't use them in any other way, but for their intended use: as example data for this demo. (I don't expect anyone to actually want to "borrow" them anyway.) Only publicly and freely available information and tools have been used in the making of this educational example software. "Nintendo" and the "Nintendo DS" brands are trademarks of Nintendo. This demo is brought to you by [www.code-basement.net] (2007 - 2013) Contact me via vsd 'at' 'my site'. CHANGE LOG ========== Version 1 --------- Revision 6.0: - Fixed the tutorial (thanks to zeruda at gabdev!). - Fixed a typo in the readme (thanks to jello!) and updated it. - Cleaned up console initialization and proper use of libnds' definitions. - Fixed material / lighting bug. - Added and fixed come source comments. - Fixed initialization function. - Fixed the view class and its usage. - Replaced the floating point gluPerspective() whith its fixed point counterpart. - Reworked some parts of the mesh rendering. - Removed last bits of "useless stuff." Revision 5.1: - Refactored and fixed the scissor class. - Fixed fopen() usage. - Reduced file path to 31 (+ \0) characters and renamed some files. - Cleaned up glEnable() usage. - Added vertex and primitive list RAM usage display. - Added free render buffer lines display. - Readme has been fixed and updated. Revision 5.0: - Renamed to "Volumetric Shadow Demo". - Fixed input bug: textures could not be toggled. - Fixed: Single "include all" header style was remedied with only including and declaring what is needed in each compilation unit. - Restructured some source files. - Removed ARM7 source file and rearranged the project to ARM9 only. (Using the default ARM7 binary.) - Changed to unmodified default Makefile. - Changed the source usage "policy" a little bit. - Separated the tutorial from the readme. - Readme has been updated accordingly. Revision 4.0: - Did quite some source clean-up, rewriting and rearranging. - Added view and scissor box classes. - Added data directory support. - Added better error detection and handling. - Changed fog table generation. - Refactored a lot of variables and functions. - Added some more comments. - Fixed some typos in the readme and updated it. Revision 3.0: - Changed file system to libfat. - Added frame rate counter. - Added touch input smoothing. (I still need to fix the slight drifting.) - Fixed the fog color. - Rearranged and cleaned up the sources. - Updated and fixed the readme. - Cleaned up and fixed the tutorial. Revision 2.0: - Moved to devkitARM R23b. - Updated to libnds 20071023. - Fixed the readme. - Slightly changed the .pbi format - old data and routines are incompatible! - Fixed "odd" loading routines. - Fixed some minor bugs. - Cleaned up the sources a little bit. - Added some info about the .tga format in "tgaloader.cpp". - Added an overview of controls to the bottom screen. Revision 1.2: - Fixed and rearranged some things in the readme. - Changed the term "shadow volumes" to the more precise term "volume shadows" in the readme. - Added a tutorial section. - Updated to libnds 20070503. - Added hardware fog. - Added capture support and a slight motion blur effect. - Added some new controls. Revision 1.1: - Fixed and rearranged some things in the readme. - Updated to libnds 2007050. - Removed my FIX versions of previously 'broken' libnds funktions. Revision 1.0: - Fixed and added things to the readme: additional thanks, change log, controls (yeah ...) etc. - Replaced the shadow volume with a better suited (and simpler) one. - Fixed the controls. ++ Initial release 1.0.0 ++