7
\$\begingroup\$

I would like to know, how dynamic shadows, that 'blend' onto other objects, are created.

enter image description here

\$\endgroup\$
7
\$\begingroup\$

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.

\$\endgroup\$
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Valmond Feb 4 '12 at 7:34
0
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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