First post here so please be gentle. I am trying to calulcate z-buffer (or depth buffer) of a polygon/surface. But I am trying to do that a very specific way. I have attached some images that go through the theory of how to do this. It would be nice if you can take some time to through the text. Sorry for the bad image quality, I had to compress the hell out of them. If its too bad I can send better resolution images.
I have gone over this multiple times and cannot understand how to go about it.
The equation seems simple z = (-Ax - YB - D)/C for the first pixel (x,y) and the just use z' = z - A/C for each successessive x. I can follow the theory upto here but then I loose it. There's something about going down the left edge of the polygon, intersection of the scan line with the left edge etc...I can't figure out how to actually program this.
So far I have calculated the (A,B,C,D) the plane coefficents and have the code that detects the left edge of the triangle and calculates the slope. After that I am stumped.
I guess my question is if anyone can help me put this theory into actual code.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.