Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've implemented dynamic 2D soft shadows from this article on It uses an image for the penubmra and is fast, physically accurate and looks good in most situations, so I really like the technique.

The problem is that it doesn't work properly for concave polygons, two polygons being close together, or a polygon being small compared to the light source. The polygons in my app are going to be user generated, so I can't easily avoid these scenarios.

Is there a technique that still looks good an accurate in the situations that I listed?

share|improve this question
Detect concave polygons and convert them to convex when the user finishes submiting it, its the approach for other lighting systems and even physics. – Grimshaw Jul 12 '12 at 2:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.