Class Rasterize_AntiAlias_Line


  • public class Rasterize_AntiAlias_Line
    extends Object
    Rasterize a clipped LineSegment into shaded pixels in a FrameBuffer's viewport and (optionally) anti-alias and gamma-encode the line at the same time.

    This pipeline stage takes a clipped LineSegment with vertices in the Camera's view rectangle and rasterizezs the line segment into shaded, anti-aliased pixels in a FrameBuffer's viewport. This rasterizer will linearly interpolate color from the line segment's two endpoints to each rasterized (and anti-aliased) pixel in the line segment.

    This rasterization algorithm is based on

         "Fundamentals of Computer Graphics", 3rd Edition,
          by Peter Shirley, pages 163-165.
    

    This rasterizer implements a simple version of Xiaolin_Wu's anti-aliasing algorithm. See https://en.wikipedia.org/wiki/Xiaolin_Wu's_line_algorithm