Hacker News new | ask | show | jobs
by liabru 4478 days ago
Nice example, but ray casting like this is overkill for this effect and with a low number of rays it's pretty inaccurate.

I prefer using the technique shown in this classic article on 2D soft shadows: http://archive.gamedev.net/archive/reference/programming/fea...

The basic idea is to project the geometry, rather than ray cast. I've implemented this sort of technique in the past and it works well.