Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a polygon scanline rendering algorithm.
It's a lot faster than barycentric interpolation, as it only needs to compute the depth once - and can then use basic interpolation to render lines. The obstruction filter can now rapidly check if a polygon is in front of any visible points, using a simple comparison operation. Even though it might check more points, it iterates through polygons instead of points, and large polygons fail fast. Additional improvements include using a simple depth check (avoid calculating rays which might be error-prone), and allowing future improvements like comparing polygons with each other. Memory usage should also be a lot more stable. It also improves speed of rendering of meshes into PNG images.
- Loading branch information