Design were having trouble with players judging where pickups were located, they kept missing them when attempting to collect. They wanted to have a shadow that was directly below the pickup at all times, regardless of light direction, so players could just walk over the shadow and guarantee collection of the pickup. We had already done something similar with the main character shadow. However that solution would be too expensive, as it uses a Scene Capture to capture depth which is then applied in a Decal Projector.
Instead I created a shader that repositions a translucent non depth checked plane below the cog. The shader is fed the distance to the ground and the angle of the surface via CPD values. This allows the shadow mesh to be positioned correctly and animated to properly represent the pickup shadows as if a light were shining directly down.
This method also had the advantage of showing a shadow, even if the pickup itself was entirely within a shadow already.
I did try another method that involved repositioning the verts during the shadow pass, but that method fell apart if the real light was at an extreme angle (some of our levels have completely horizontal lighting) and does not have the advantage of being visible even in an already shadowed area.
----
Junkster is an unreleased project from by Stormcloud Games. Currently stalled by lack of publisher but with some luck the product will release to the public, but as yet it is unknown when.
Wishlist on steam if you want to see it released: https://store.steampowered.com/app/1675860/Junkster/
All the available collectible types with their shadow, not obeying the sun direction.
Shows that as a collectible moves, its shadow placement can update to reflect its new conditions.