The rendering equation for lambertian BRDF is (see Spherical integrals for info on how to solve):
Where
Note, I used Mathematica to solve the last integral. Wolfram isn't good at delta distributions.
FullSimplify[ Integrate[ Integrate[(DiracDelta[t - a, p - b])/Sin[a] Sin [t], {t, 0, pi/2}], {p, 0, 2 pi}], Assumptions -> {0 < a < pi/2, 0 < b < 2 pi}] = 1