Use mix() for lerp and fix an array bounds bug in the process.

Double win.