I have a doubt regarding shape lights pdfs, specifically various sources point at the fact that the pdf is a constant:
$$ lightpdf = 1/A $$
Where $A$ is the area of the light surface. Expressed in solid angle terms, this becomes: $$ lightpdf(\omega) = \frac{r^2}{cos\theta A} $$
or $= 0$ for directions on the hemisphere which do not hit the light.
Where $r^2$ is the squared distance from the hit point o the light surface and the point we are sampling from, and $\theta$ the angle from the light surface normal and our ray direction (source).
What isn't clear to me is knowing that the pdf should satisfy this condition:
$$\int_0^{2\pi} lightpdf(\omega)d\omega = 1$$
Assuming for example a sphere light source (but a cylinder would also do), if in the second formula above we use the entire sphere area as $A$, aren't we using a solid angle for the sphere which is double of what it actually should be? (by including the half surface we cannot see from $p$:
including the half surface we cannot see from p:
- this is taken care of by the visibility function when sampling lights. $\endgroup$