np this stuff is confusing. The reason why the "writing" function has an extra factor is because it's doing two things at once:
- Convert incoming light to SH (which for a directional light means you evaluate for the light direction).
- Then convert that SH into the SH for the response of a diffuse surface of a given normal (so later you read the SH using some normal direction). In SH this can be done by multiplying each band by a specific constant.

@sjb3d@mastodon.gamedev.place
Graphics/systems programmer. Previously at Unity, Media Molecule (Dreams), Sony ATG. Interested in tracing rays, distance fields, Vulkan, Rust/Zig and generally keeping GPUs running efficiently. Opinions my own.
if you're storing the diffuse response to a directional light in SH, then I think all the odd bands apart from band 1 are zeros. So for SH_AddLightDirectional in your first link, the next 7 coefficients would be zeros! (There is a derivation of this in "An Efficient Representation for Irradiance Environment Maps" at eqn 8.)