Can be caused by calculating normals using ray-surface intersection
points in world coordinate system instead of canonical coordinate system
Sampling
Problem
Basic Monte Carlo integration is easy:
I = 0
for 1:n
x = rand w/ distribution favoring large values of f(x)
I = I + f(x)/p(x)
I = I / n
But distribution for random numbers does have to favor values
where f(x) is significant (aka “importance sampling”),
otherwise you’ll waste lots of time adding very small
numbers to the estimate
Inversion
Use inverse of CDF to map uniformly distributed random numbers
to ones distributed per CDF