Sparse Zonal Harmonic Factorization for Efficient SH Rotation
We present a sparse analytic representation for spherical functions, including those expressed in a Spherical Harmonic (SH) expansion, that is amenable to fast and accurate rotation on the GPU. Exploiting the fact that each band-l SH basis function can be expressed as a weighted sum of 2l + 1 rotated band-l Zonal Harmonic (ZH) lobes, we develop a factorization that significantly reduces this number. We investigate approaches for promoting sparsity in the change-of-basis matrix, and also introduce lobe sharing to reduce the total number of unique lobe directions used for an order-N expansion from N-2 to 2N - 1. Our representation does not introduce approximation error, is suitable for any type of spherical function (e. g., lighting or transfer), and requires no offline fitting procedure; only a (sparse) matrix multiplication is required to map to/from SH. We provide code for our rotation algorithms, and apply them to several real-time rendering applications.
algorithms rendering theory spherical harmonic rotation