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 would like to know, how dynamic shadows, that 'blend' onto other objects, are created.

enter image description here

share|improve this question
+1 me too. Any chance for a video? – ashes999 Feb 4 '12 at 1:35
The game is Blocktality - – liamzebedee Feb 4 '12 at 1:40
up vote 7 down vote accepted

These can be done using shadow mapping. Basically, place the camera at the light source and render the scene into a depth buffer; the resulting buffer identifies all the lit surfaces since they are just the surfaces the light can "see". This texture is then used in the pixel shaders in the main render to mask away light on surfaces behind the shadow map. There are plenty of shadow mapping tutorials on the Web, so consult those for details.

share|improve this answer
On the screen shot there is one Omnidirectionnal shadowmap light, you might want to check out dual paraboloid shadowmaps or shadowmaps with cubemaps for those. – Valmond Feb 4 '12 at 7:34

Assuming you know how to generate a shadow for an object, generate all the shadows separately, and then blit them onto the scene. Any overlaps will have the sum of their... darkness (as it were), and therefore look like the shadows overlap.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.