How to make 2D objects/sprites react to lighting and cast shadows in a 3D world?

For example, I have a top-down 3D world and I want to place some 2D sprites/objects in the world (like crates, barrels, furniture etc). How can I make it so that they react to the lighting from the 3D world?

Example this:

I think that might be your solution.