Hi
I’m trying to think of how to achieve the following effect:
The player needs to keep up with an NPC. If the distance between the NPC and the player reaches a certain threshold the objects in the game view should all fade to black over time and the blackness increase as the distance between the player and the NPC increases. Additionally, I would like to make objects nearer the player fade to black slower or after objects that are far away.
This would happen to all visible objects not on in a UI layer, regardless of whether they use a standard or custom shader.
Is there a way to do this? I thought perhaps of having a spherical volume with the player at its center, have it shrink, and depending on the distance to its border adjust the color of objects (with everything on the edge or outside it black).
I guess that using depth info that everything behind the sphere’s “shell” would be rendered black with an outline but I’m unsure of how to handle the interior objects have their colors fade to black towards the shell. Perhaps a better, simpler idea would be to have some kind of light volume shrink with the sphere?
Any other ideas?
Thanks in advance