So, this post talks about cosine weighted hemisphere sampling.
Really its simple.
There are 2 ways to do this, both are outlined in Philip Dutre’s “Total Compedium”
– generate points on the disk
– project points upward
– Use these explicit formulae.
//generate 2 random floats, each between 0 and 1 RANDOM_NUMBER_1 = randFloat() ; RANDOM_NUMBER_2 = randFloat() ; PHI(aziumthal angle) = 2*PI*RANDOM_NUMBER_1 ; THETA (elevation angle) = acos( sqrt( RANDOM_NUMBER_2 ) ) ;
That’s it! This is what you get: