Wow, haven’t posted here in a while. Glad to see my web hosting fees are going to good use!
Anyway. These days, I’m working on improving the shadow algorithm we use for our game. One of the common ways to improve the perceived quality of PCF shadows is to use a rotating Poisson Disk filter, but generating those coefficients was always a challenge. Not anymore…
In the past I’ve used the sample code from a paper called “A Spatial Data Structure for Fast Poisson-Disk Sample Generation”, but that command-line tool isn’t exactly intuitive. Still, I usually manage (after a few tries) to get a set of sampling points that work for my needs, and move on. Of course, the next time I need sample points, I don’t remember how I made the tool work and I waste my time again.
I’ve wanted to make a tool to generate Poisson disk coefficients for a long time, but never took the time to do it — the usual references found via Google aren’t exactly what I call “accessible”.
Fast-forward to last friday: I hit the jackpot, completely by accident. A remarkably simple generation algorithm (“Fast Poisson Disk Sampling in Arbitrary Dimensions”), totally easy to understand, and someone else already wrote the code in C#? Ok, I know what I’m doing this weekend.
After a bit of futzing around (I haven’t done C# in a while, this was a good excuse to restart!), here are the results:
Finally, an easy way to generate those coefficients, and you can visually spot-check the resulting coverage. Don’t like the coverage? One click and you have a new set of coefficients, in ready-to-paste-in-your-shader form. How cool is that?
You can download the tool + source code here. There are no external dependencies besides the .NET 2.0 framework.
Let me know if you can find ways to improve it, or if it’s been useful to you.
PS: In case you don’t get it, “Poisson” means “Fish” in french. With apologies to Siméon-Denis Poisson…

Dude! Averaging one post per year!
Yeah, it’s pretty pathetic. Hey, at least I’m trying
Thanks! This is useful.
Thank you, a really nice tool!
Maybe it would be better to use dots instead of commas in the floating point values (0.198124f instead of 0,198124f). That would reduce the copy and paste work to use the generated poisson disk in shader code.
Caph, the tool uses the language settings you have set in Windows (actually it’s not me, it’s the default formatting behavior of System.Text.StringBuilder). If you look at the screenshot, you’ll see I get dots on an English system
In Windows 7, you can change the separator by going in Control Panel | Region and Language, select the Format tab and click Additional Settings. From there, in the Numbers tab, you can change the Decimal symbol to whatever you need.
*Doh*
Thank you, I didn’t know that.
Just dropping a note to say thanks! This is very useful.