Patent ID: 7098924

Claim:
A method for obtaining an attribute within a triangle, comprising: obtaining the vertices of a triangle, each vertex being represented by a set of coordinates in a world coordinate space and having at least one attribute; for each vertex, transforming the world space coordinates and the attribute of the vertex to coordinates and an attribute in viewer space to create viewer space coordinates and a viewer space attribute, said viewer space coordinates being homogeneous coordinates, computing a set of homogeneous coefficients of the triangle based on the viewer space vertex homogeneous coordinates, said homogeneous triangle coefficients including perspective data, and projecting the viewer space coordinates of the vertex to coordinates in 2D screen space; determining, in the 2D screen space, pixels that are affected by the triangle based on the 2D screen space coordinates; and for each pixel affected by the triangle, computing, based on the homogeneous triangle coefficients, a set of barycentric coefficients in viewer space, and performing a linear interpolation based on the set of viewer space barycentric coefficients and the viewer space attributes of the triangle vertices to obtain the attribute of the pixel affected by the triangle.