Loading the code workspace…
Write a C program that compares linear and perspective-correct interpolation of a color attribute across a triangle.
Requirements:
Perspective-correct interpolation, standard in GPU hardware since 3dfx's Voodoo cards in the mid-1990s, is why textures don't visibly warp on angled surfaces — a defect visible in early PlayStation 1 titles that skipped it to save cycles. This 1/w interpolation trick is fixed-function silicon in every modern rasterizer, but anyone writing a software renderer or a WebGL fallback path must implement it by hand.