Simon Brown
sjb3d's profile header
Simon Brown

@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.

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.

Replying to someone

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.)

Elk Logo

Welcome to Elk!

Elk is a nimble Mastodon web client. You can login to your Mastodon account and use it to interact with the fediverse.

Expect some bugs and missing features here and there. Elk is Open Source and we're actively improving it as a community project. Join us and let's build it together!

If you'd like to report a bug, help us testing, give feedback, or contribute, reach out to us on GitHub and get involved.

To boost development, you can sponsor the Team through GitHub Sponsors. We hope you enjoy Elk!

PatakAnthony Fu三咲智子 Kevin DengJoaquín SánchezDaniel RoeTAKAHASHI Shuuji

The Elk Team