2D Shadows


Hello Readers!

I recently started working on a little 2d top-down techdemo using my engine, and I soon found out that I wanted shadows!
Well, how do you do this when using sprites? (so pure pixels?)
The implementation what I now did was create 4 vertex points at each corner of the bounding box (so the shadows aren’t pixel perfect :() and then use those to generate the shadows.
And guess what, IT WORKED!
You can read about the code I used here: http://www.ogre3d.org/forums/viewtopic.php?f=10&t=56294&p=382388#p382388

And an image to show it off:
2D Shadows
(Click the image to show real size)

[edit]
Another image with some changes made, and a small test map
2D Shadows
(Click the image to show real size)

Calsmurf2904

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: