Why divide albedo by π

Let's try calculating total reflected outgoing energy without it:
We can pull out and as they are both constant:
Now, note that (See Spherical integrals):
So we get:

Oh no! This does not satisfy energy conservation:

If we divide albedo by :
We reflect exactly incoming incoming energy attenuated by albedo, and energy conservation is satisfied.

See also https://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/

#math #light-transport #pbr