Hello all, Looking for the best way to create a shadow effect without losing too much on the performance side, preferably nothing :). Here's what I'm doing:
This is a shadow for a square. That's it. the shadow should move with the square, but the quality is pretty much irrelevant as long as it has some falloff and it's a square shadow moving with the square mesh, so no realistic shadow effects needed. this is a 2d game so you will never see the shadow from any other angle.
Any help would be appreciated
EDIT: In response to people posting about the blob projector,would a blob projector be less memory intensive than just an image of a square that has an alpha?(since this is a 2d game, the shadows don't exactly have to project)
Assuming the ground is flat, use a quad with a transparent texture for the shadow. Blob shadows can be expensive because they re-draw the entire object even if the shadow is projected just on a small part of it.
check the lerpz tutorial for blob shadow.
Use the Blob Shadow Projector if you just need a fake square shadow with nice falloff.
Well, i'm not 100% sure how the projector works internally, but i think he just add the projector material to all objects in his frustum and adjust the uv-coordinates accordingly.
Performance is relative. The projector may have more cpu usage, while a seperate plane can cause another draw call. If you develop for iPhone (I'm not an iPhone dev.) it's important to keep the draw calls low (very low: around 20 what i've heard). In the end it depends on the platform and hardware you develop for. Sorry but can't say much more on that.
Maybe Eric can enlighten us. ;D