function SHBasis(const LM: Cardinal; const PhiTheta: TVector2Single): Float;
Calculate spherical harmonic basis function for given arguments.
LM indicates (L, M) that specify which SH basis to use. LM determines a pair (L, M) in the natural order: for each L, take for each M from -L to L. That is, LM = (0, 1, 2, 3, ...) indicate
For each SHBasis function (first index of the array is LM of this function), a precalculated results of basic spherical harmonic functions. Multiplied by solid angle of this cube map pixel, since this is what you usually need.
For each side of the cube, and for each pixel on this side (pixels are arranged same as in TGrayscaleImage, that is row-by-row from lower to higher, from left to right) this gives the result of SHBasis for this direction. Multiplied by solid angle.
You have to initialize this (once, like at the beginning of your program) by InitializeSHBasisMap.
This is useful for calculating sh basis vector from given cube map: since you can just project any function on any basis, so if you have a particular cube map you can project it on each SH basis function. See SHVectorFromCubeMap implementation for code how to use SHBasisMap for this, and in simple cases you can just call SHVectorFromCubeMap.