Probability density for explicit light sampling When implementing explicit light sampling, I am separating the monte-carlo approximation to two parts
$$\frac{1}{N+M}(\sum^N \text{direct} + \sum^M \text{indirect})$$
$$\text{direct} = \frac{\text{bsdf} \times C \times cos(\theta)}{p}$$
I am confused as how to obtain $p$ for direct lightning.  My light source is an arbitrary triangularized mesh and I am sampling random points from it's surface.
A solution was presented here: Path weight for direct light sampling
$$\frac{A}{r^2} (N_\text{light} \cdot -L)$$
Where does this come from?  I'm asking for a reference or a derivation. Thanks!
It comes from the relation between the area formulation and the solid angle formulation of the rendering equation: $d\omega = \frac{\cos\theta_L}{r^2}dA$:
https://arxiv.org/abs/1205.4447