How does a rasterizer work?

How does a rasterizer work?

Rasterization (or rasterisation) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, which, when displayed together, create the image which was represented via shapes).

How does 3D rasterization work?

With rasterization, objects on the screen are created from a mesh of virtual triangles, or polygons, that create 3D models of objects. In this virtual mesh, the corners of each triangle — known as vertices — intersect with the vertices of other triangles of different sizes and shapes.

Is a triangle a pixel?

Let’s say that the edge of a triangle can be seen as a line splitting the 2D plane (the plane of the image) in two (as shown in figure 2). If for this point, we find that the edge function returns a positive number for all three edges, then the pixel is contained in the triangle (or may lie on one of its edges).

Is lines raster or vector?

Unlike pixel-based raster images, vector graphics are based on mathematical formulas that define geometric primitives such as polygons, lines, curves, circles and rectangles.

What is raster image file?

A raster image file is a rectangular array of regularly sampled values, known as pixels. Each pixel (picture element) has one or more numbers associated with it, specifying a color which the pixel should be displayed in.

What does conservative rasterization do in Direct3D?

Conservative Rasterization is mode of operation for the Rasterizer stage of the Direct3D Graphics Pipeline. It disables the standard sample-based rasterization, and will instead rasterize a pixel that is covered by any amount by a primitive.

How is a point interpreted in Triangle Rasterization?

A point is interpreted as though it were composed of two triangles in a Z pattern, which use triangle rasterization rules. The coordinate identifies the center of a one pixel wide square. There is no culling for points. The following illustration shows some examples.

What are the rules for rasterization for primitives?

Rasterization rules for primitives are, in general, unchanged by multisample antialiasing, except: For a triangle, a coverage test is performed for each sample location (not for a pixel center). If more than one sample location is covered, a pixel shader runs once with attributes interpolated at the pixel center.

How many pixels does a degenerate triangle cover?

However, for implementations that support degenerate triangles, a degenerate triangle along an edge or corner must cover at least one pixel; so nothing falls through the cracks. This type of rasterization is sometimes referred to as Overestimated Conservative Rasterization.