PDA

View Full Version : Volumetric Shadow Demo (1.5.0)



wraggster
June 29th, 2008, 09:46
News/release from silent_code (http://forum.gbadev.org/viewtopic.php?t=12873&sid=3cf8dcd8dbf7980ebc5c753e9f639e03)


Hello everybody!

I have updated the Volumetric Shadow (Tech)Demo (formerly know as the Stencil Shadow Demo and Volume Shadow Demo.)

It's compatible with most, if not all DLDI-able 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 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 some rewrites and a lot of renaming and rearranging! I have also included some better (or any, at least ;^D ) error detection and handling.

Now all data can go to ROOT/data/vsd_data or the ROOT!

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-able .nds and an FCSRed .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's some code and data structures I don't recommend using in "serious" code, but for the sake of simplicity, I used it here (e.g. the triangle structure.) This issue will be addressed in the next major release, 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 punch me in the face - right here in this thread - for silly programming and the like (that demo was my first publicly released open source software) - just make sure you read the readme first! ;^)

Anyways, I hope this demo will be useful to at least some of you. :^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! :^)

Download and Give Feedback Via Comments

masterchief929
June 29th, 2008, 12:43
very cool. :)