Saturday, January 16, 2010
By the Broccoli in my hand...
Yes you see right. That is a flying saucer fighting a giant broccoli.
Video here : http://www.youtube.com/watch?v=FsAVcQAfC3s
What's new? Well I finally figured out what was wrong with my directional shadowmapping... embarrassing, really. I didn't realize that in orthogonal projection the z is already clamped between 0 and 1, I kept trying to divide it further by Z far... oops!
The decals are painted using a way I kind of theorized on my own, still needs work. Basically, a billboard quad is rendered and then we figure out the distance to the pixel behind it to figure out the tex coords and all that jazz. I will explain it more coherently when I have it perfected.
The bonus of this is no monkeying around with copying geometry, finding tex coords, etc. nonsense... this gives us seamless decals across all static geometry. FUN!