4 ms·
> You may wonder why I didn't just write a routine to plot filled triangles, and then draw quadrilaterals as two adjacent triangles. The answer is that with the
by yellowapple 4y ago
> You may wonder why I didn't just write a routine to plot filled triangles, and then draw quadrilaterals as two adjacent triangles. The answer is that with the libraries that support exclusive-OR plotting this results in a visible line between the two triangles, because that line is drawn twice; having a dedicated routine to plot quadrilaterals avoids this. In addition, this routine is faster.
I guess the Sega Saturn was on to something, then.
- pubby 4y agoAmusingly, old graphics hardware was often quad-based because their past iterations were 2d sprite hardware, and that's what their designers knew best. The "correct" thing to do is follow the top-left rule for rasterizing triangles. This causes the pixels of a mesh to only be rendered once and you won't get seams.
- bpye 4y agoPowerVR was especially funky. They used planes to ‘carve’ out polygons. It meant that they could genuinely draw convex polygons with arbitrary numbers of side by using ~N+1 planes. I found it kind of cool to try and read through the simulator code in their open source release [0]. I imagine there would be an interesting write up if someone sat down and really wanted to understand it. [0] - https://github.com/powervr-graphics/PowerVR-Series1 https://github.com/powervr-graphics/PowerVR-Series1
- sreekotay 4y agoThis seems odd. You can absolutely draw triangles with shared edges without touching the same pixel twice.
- royjacobs 4y agoIndeed. Otherwise you wouldn't be able to render any kind of transparent objects without weird seams.