What type of shading algorithm might be used to create shadows like these?
the one I'm making is similar but it is all done with a 2D drawing API powered by OpenGL so there is no Z coordinate.
In addition, for the hand itself, I'd really like to get a shaded feel like seen here:
I'm just not sure how to achieve a shaded look close to that.
The number of cards is bound to change and the cards get thrown onto the table so I can't use any type of light map of sorts.
What sorts of algorithms should I look into (aside from blur which I know 'll need to do?)
Thanks
Update
I'm making a 2D card game. I want to add dropshadows offset from the cards, a bit like:
The way I'm thinking of doing it is:
- Keep a texture that is the same size as the backbuffer.
Draw dark rectangles as makeshift cards to that texture.
Blur that texture.
- Draw my cards to that texture.
- Do additional lighting on the cards.
- Draw this texture to the backbuffer.
My questions are:
Is this the right way to do this?
Is there a way to do it without render to texture (keeping a bitmap
as big as the backbuffer)?Is it safe to assume that the maximum texture size will not be
exceeded by the backbuffer size? (What I mean is, if the backbuffer
is 2000x3000, then is it safe to say that I can create a texture in
video memory of that size?
Thanks