Hi everybody,
I’m working on a 2D game with a creature editor, where you can attach, move and rotate bodyparts as you like.
It would be awesome if I could dynamically calculate and draw hard shadows on my sprites, like shown in the picture below:
The problem is, that the players can rotate and mirror bodyparts, that’s why I can’t draw the shadows directly on the sprites (e.g. both creatures above use the same body but with a different rotation).
So now I’m looking for a way on how to create this look. Options I thought of are:
- Directly manipulate the sprite pixels and somehow calculate which should be colored in a darker color.
- Use a Cel Shading shader and a normal map for each bodypart.
I have no idea if one of those two options would work, I’m especially unsure about the shader approach. I don’t know enough about shaders to say if this is possible and how well it will turn out.
What do you think of my approaches or have you got any other ideas on how to archieve this effect?
I’m grateful about every answer!