Get the latest tech news

Perspective-Correct Interpolation


...and why the original PlayStation had textures that warped when the camera moved When implementing my differentiable renderer, I re-learned how rasterization works. In doing so I came across my favorite piece of code for the month: perspective-correct interpolation.

Given an screen space point \(\mathbf{x}^\prime\) that we know is inside the projection \(\mathbf{a}^\prime, \mathbf{b}^\prime, \mathbf{c}^\prime\) of a triangle \(\mathbf{a}, \mathbf{b}, \mathbf{c}\), how do we compute what barycentric coordinates it corresponds to? But this increased the polygon count and hurt the PS1's support for large open worlds like those seen in contemporary N64 games like Ocarina of Time or Super Mario 64. Rendering Super Mario 64 with PS1-style affine interpolation yields surreal results on the low-poly levels.

Get the Android app

Or read this on Hacker News