Thursday, November 8, 2012

Hammersley Points on the Hemisphere

I wrote a short collection of notes that describe how to use the Hammersley point set in 2d for generating fast sampling points on the hemisphere. The notes can be found at
http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html.
The Hammersley point set is one of the simplest quasi-Monte Carlo sampling patterns and in 2d it can be efficiently generated with a couple of bit operations (and some floating point multiplications). It is thus a good candidate when some 2d sampling pattern is needed inside a shader program and is a good alternative to using a look-up table in many applications. The article focuses mainly on generating sampling points on the hemisphere but the point set can of course be used for many other applications like shadow map filtering or screen space ambient occlusion.
Here is an image of the pattern for 16 points:
In the article above you can interactively change the number of points to see how the pattern behaves.

1 comment:

  1. I every time spent my half an hour to read this blog’s posts daily along with a mug of coffee. Such a beautiful post. It is so important to sit back every once and a while and just be grateful.

    Funeral homes website design by Optimized360

    ReplyDelete