I am building a game that uses prerendered static backgrounds similar to classic RE games. I have the cameras and scene working fine. I cannot figure out how I can get the shadow of the player character in the world.
Here is a screenshot of what a scene looks like:
Here it is with the collision planes which have the shadows (the collision planes are hidden during gameplay):
A typical render flow for this scene involves:
- Get the depth map of the scene
- Compare with the collision data depth map
- Render pixels based on priority of above depth maps
My question is, how can I extrapolate the shadow map from the collision planes, and then add them back in the post post process material? So basically, can I have an invisible collision mesh that can also have shadow casted on it?