exosyphen wrote:Perhaps the guy who started this thread could enlighten us all, and tell us what EXACTLY he want's to render ... so we can give better answers :)
Well, I don't have any specific plans. I'm just thinking about software rendering in general and wondered what the current state of the art approach is.
I've always toyed around with software polymappers in the past and even used them on our latest game (that schumacher kart racing game) as prototype mappers. Another coder wrote the polymappers in assembly, and after I had a brief look at them I decided that one day I'll write my own (his approach to render them simply sucks).
Since then I meditate over the issues of rasterazing on the arm family. Caching is a *big* issue and I think I found a clever solution to speed up the average texel memory access (you know - 90° rotated textures can kill performance due to cache trashing). It improves the average case of poly-rendering by a factor of 3 (straight mapping) on the pc. It should be even more on the arm due to the smaller cache. Mipmapping is for almot free and minificated textures aren't a performance hog anymore. Just bilinear interpolation will become less efficient.
The missing divide of the arm is a problem. I've experimented with series calculation of reciprocals and think it's a great way to get rid of the divisions in perspective texture mapping.
I just calculate the exact perspective division once at the start of a span and reuse it as a starting point for the next iteration of the next 1/z value. Since z does not change that much per pixel the previous value is a damn good starting point for the iteration and the result is very close to the real value. In my tests there was almost no distortion except for extreme tilted triangles).
Guess this approach has been used before, but I haven't seen a fast perspective correct game with lots of polys yet. And I wonder why.
The only question that remains: zbuffer or not. That's why I asked what's used at the moment.
Regards,
Nils Pipenbrinck