This repository contains the source code of the paper Primary-Space Adaptive Control Variates using Piecewise-Polynomial Approximations by Miguel Crespo, Adrian Jarabo, and Adolfo Muñoz from ACM Transactions on Graphics.