3 algorithms for shadow volumes!
Blitz3D Forums/Blitz3D Programming/3 algorithms for shadow volumes!
| ||
hello! as you may know, i've been working on stencil shadows since ~ 7-8 months day&night. in my worklog is the system(by me and daredevil!) this system is using the second algorithm, but since a week it is using the third algo! here are 3 algorithms for shadow volumes. they are not by me, but they are optimazed by me! use it as yours! [b]Use keys 1-3 to toggle the algorithms! |
| ||
There's a bug on line 368 ... state1 = ad1<b> Should be state1 = ad1[b] Pretty fast though :) Stevie |
| ||
oops, mistyped it a lil bit, but ok. ps: if you want to use these algorithms, i would reccomend the third one. |
| ||
This is cool. What's the recommended way to use it - ie to end up with an image that shows only where the shadows intersect something, rather than the entire projection? |
| ||
Wow! This is cool! But could you give us some code for, like Sledge said, just the actual shadow? |
| ||
i have got problems with my upload... in a few weeks i will post the new shadow system with the algorithm no 3. but the shadow system is using the second one yet: it is easy to implement the other one if you wanna work with it, but i have optimazed a lot!!! for exaple, he saves the 'hacked' data about the mesh into a file and so on... http://www.blitzbasic.com/logs/userlog.php?user=8270&log=660 |
| ||
Thanks a lot! I guess it would be pretty easy to use it with one of the recent stencil demos, eg. by Tom that us using DX7 extensions, or the one that is made in plain blitz that is using some tricks. I haven't got the links right now, but a search for "stencil" should bring them up. |
| ||
now i got it uploaded! the third algorithm is used in our system here: http://www.blitzbasic.com/Community/posts.php?topic=62378 |
| ||
wow .. very nice! |