Module rasterizer

Source

Functionsยง

calc_all_pixels_within_triangle
Returns all tuples (w0, w1, w2, p) consisting of the baryentric coordiantes (w0, w1, w2) of a pixel (p), for all pixels inside the given triangle.
calc_inv_z_for_all_pixels
Calcualte the inv depth for all pixels inside a triangle using perspective correct interpolation
pixel_within_triangle_and_barycentric
Assume the triangle vertices a,b are in counter-clockwise winding order -> Fix this. GLTF can be any winding order