3 ms·
I find it interesting they had an explicit "flat trapezoid" primitive (slide 14). By flat, I mean it only supports trapezoids where the top and bottom edges are
by phire 2y ago
I find it interesting they had an explicit "flat trapezoid" primitive (slide 14). By flat, I mean it only supports trapezoids where the top and bottom edges are flat, aligned with the y grid.
I'm not aware of any GPU that explicitly supported such primitives, but you actually get these flat trapezoid for free with certain designs of a triangle rasteriser. A triangle is rasterised with 3 edge equations, and it's useful to explicitly define a start and finish y position. A flat trapezoid is just two edge equations with the same start and finish y positions (and I assume their line primitive is the same thing, a but with a single edge equation)
While I'm not aware of any GPU with explicit support for these flat trapezoids, the Nintendo 64's RDP takes edge equations directly (usually generated by the RSP microcode), and if you feed it malformed edge equations, it can render certain non-triangle polygons, though most of them aren't useful.
But one of the malformed polygons are the same flat trapezoid primitive. And while playing around and attempting to design a better RSP microcode, I discovered that these flat trapezoids appear to be useful for a fast polygon clipping algorithm. My goal was to replace the N64's slow depth buffering with portal-based clipping on the RSP, but there is no way to check if it's faster without an actual RSP implementation.
- djmips 2y agoThe core of my software rasterizer written for an Atari ST 3D game was trapezoids.* The polygons would be broken into trapezoids and then the fill was, what I thought at the time, fast dual DDA (for left and right edges) and then some fast memory fill for the parts that were word width between the two edges. For your N64 experiment, you say there's no way to check if it's faster without an actual RSP implementation - was there something stopping you from doing so? I've seen other people write custom RSP code in present day. * HP later patented this idea (expired now).
- spicyjpeg 2y agoFlat triangles and trapezoids are sometimes used internally by these GPUs as a building block for other polygons, possibly since the logic to split up triangles and quads into flat trapezoids may have taken less die space than a rasterizer capable of handling three edge equations at a time rather than just two. While exposing these lower level internal primitives typically did not make sense for general purpose graphics accelerators, some in-house embedded implementations did actually go further and only supported flat trapezoids, relying on the CPU to preprocess more complex shapes. For instance, the "SOLO" ASIC used in second-generation WebTV boxes took this approach [1] (among other interesting cost-cutting measures such as operating natively in YUV color space). [1]: http://wiki.webtv.zone/misc/SOLO1/SOLO1_ASIC_Spec.pdf http://wiki.webtv.zone/misc/SOLO1/SOLO1_ASIC_Spec.pdf (warning: 200 MB scan)
- SJC_Hacker 2y agoI've only dabbled in 3D modelling but all the meshes I've een which looked "beatiful" mostly used quadrilaterals. From my own experience trying to model things I found that to be the case - when I had vertices that didn't have four segments emanting from them, my model started to look ugly. Of course when going from area of different detail level, this is unavoidable but shoud be minimized