efficient software rasterization

I recently started out my rasterizer using Nick's guide (fixed point halfspace evaluation), and I've also read the linked paper on homogeneous 2D rasterization. I'm trying to figure out how to make them play nice together.

When using Homogeneous 2D rasterization, my understanding is that the whole point is to avoid the complications of dividing by w. Considering that, how do you need to determine what bounding box in the framebuffer we should be evaluating half-spaces for, and actually evaluate those half-spaces, without going ahead and dividing by w to get the screen-space coordinates of each vertex (which may be reasonable if you haven't done clipping).

Is the resolution here to give up on fixed-point calculation, and try to figure out how to get correct results in floating point without a significant performance loss?

Even more generally, I'm trying to do a survey of techniques for fast-as-possible triangle setup and attribute interpolation. Does anyone here have any pointers to techniques that work well other than the homogenous 2D technique?
 
Considering that, how do you need to determine what bounding box in the framebuffer we should be evaluating half-spaces for, and actually evaluate those half-spaces, without going ahead and dividing by w to get the screen-space coordinates of each vertex...
You can't avoid the division here. However, you can get away with a low precision one when doing tiled rasterization. Basically, for each vertex you classify in which tile it lands. This can be done recursively, and in hardware it can be perfectly pipelined. In software things are slightly uglier. You either pay for the exact division, which also enables you to do 2D half-space evaluation, or you approximate the division and use the more expensive homogeneous half-space evaluation.
 
Back
Top