Dynamic 2D Shadows for Windows Phone 7

By request, here is the port of the old Dynamic 2D Shadows sample to XNA 4.0, on Windows Phone 7.

Download Dynamic 2D Shadows

There may be performance improvements that could be done. I just took the old code, made the changes so it runs on WP7, and added touch input.


  • Tim

    Yay!!! Thanks for posting, really needed this.

  • Squigglyfrog

    Thanks for this! Interesting, under win 8, this wont run under the wp simulator in vs2010.. i get garbage textures.. runs fine on the phone.. it does work under the sims in visual studio 2012 for wp tho..

  • Jess

    regarding your xna tutorial here: http://www.catalinzima.com/samples/lightning-sample/
    I would really like some help to be able to generate lightning beams in my 3D game. I have managed to draw lightning sprites, however it doesn’t always face the camera and thus I somehow need to use billboarding, but I’m not sure how.

  • Matt

    Hey Catalin, awesome work on these dynamic shadows.

    I have been trying to tweak and change the way you generate the shadow map to allow the object casting the shadow to be illuminated.

    In your current examples the objects are always visible, even when in the shadows which looks a little strange. I’m trying to make it a bit more realistic so shining an light on the Cat in your earlier example, would illuminate the cat but still cast the same shadow it currently does.

    Have you got any suggestions to achieve this?

  • http://pmyn.pl pmynlabgames

    Really helpful tutorial 🙂

    If u have smth problems with shadows on some phone or WP7/8 version please follow this link :

  • http://comunidad-epcp.cambioandino.org/profile_info.php?ID=67420&my comunidad-epcp.cambioandino.org

    Nice weblog right here! Additionally your website lots up fast!
    What web host are you the usage of? Can I get your affiliate link on your host?
    I wish my website loaded up as quickly as yours lol

  • http://personalfinancehq3.soup.io/post/327138443/Debt-Counseling-By-Means-Of-Credit-Guard http://personalfinancehq3.soup.io

    Thank you for some other fantastic article.
    The place else may just anyone get that kind of information in such a perfect approach of
    writing? I have a presentation subsequent week, and I’m on the search for such info.

  • Michael


    I don’t have time to explain in detail, but if you look on the older page for this sample someone in the comments explained exactly how to do what you’re asking! It works great – it’s just reordering a few lines of code.

  • Dominique Louis

    Afternoon Catalin,
    I may be porting some of your samples to MonoGame. Would you be interested in the Zip files if I get round to doing that?