Thursday, February 14, 2008

More Software Occlusion

I have a software Z Buffer!

It's not completed yet - so far I've written the code to project a surface to virtual screen coords, and write the surface verts into the Z buffer. I still need to fill each surface polygon (although I've been reading up on scan lines, which seem the most straightforward way of doing it, so this bit shouldn't be too bad). Once I have that done, I will already have 99% of the code I need for occlusion testing, so linking the rest together will be extremely trivial.

The really really nice thing about this is that it's actually pretty damn fast. Certainly faster than using Hull Checks, Traces, or Clips, and also it will give me full reliability.

0 comments: