3 ms·
Oh, that's very nice, we've come full circle :) What do you mean by "sorting 1500 triangles"? You mean sorting their vertices? I believe you already do that in
by ggambetta 4y ago
Oh, that's very nice, we've come full circle :)
What do you mean by "sorting 1500 triangles"? You mean sorting their vertices? I believe you already do that in a couple of places; since you're using a depth buffer, I don't think you need to sort them back-to-front, so I'm not sure what you mean.
True that a 120x120 display is tiny, but that also means that you can get away with two static arrays of 120 elements for the left and right sides of the triangle, no need to do any allocation or use tons of memory.
- bstrobl 4y agoBy scanline rasterizer I assumed a system similar to the original Quake scene rasterizer best described in Michael Abrash's Graphics Programming Black Book. The method allows saving substantially on any overdraw since fillrate is really the primary bottleneck here. I did a quick check on your page and it seems the implementation describes a per triangle setup vs the more complicated solution by Carmack and his team? Could still work well for larger triangles, maybe with a check on triangle size to avoid really small ones. Quake did after all utilize 3 different rasterizers to optimize performance depending on use case.
- benj111 4y ago>we've come full circle Triangle, surely...