Player Vision Radius In a Top Down 2D Game. (Alpha maps?)

I am looking to create an adjustable, animatable Player Vision Radius in a top down 2d game.

basically the game has a blue background, that will be visible no matter what, and on top i draw the player and tons of level objects.

however i want those level objects to only be visible of this player radius (a circular shape of changing size) overlaps it.

I have roughed in two paint doodles to give you a clearer idea of what I’m hoping to achieve. (sorry for the size.)

26539-required.png

I was thinking a sort of global alpha layer that is on top of everythign in the game, but does not affect the background or player in any way.

So the visibility of the other 2d level items is totally defined by this global alpha layer (the circular radius shape),

I have no idea if this is even remotely possible within unity, (i have experimented without success)

Any help would be amazing.

if the background is always blue, then make a blue sprite with a transparent hole in the middle, which is a child of the camera.
Another possibility would be to turn off the renderer, if the gameobject is too far away from the camera. This however wouldn’t result in half rendered objects. For this you could use:
(Vector 2/3 cameraPosition - Vector2/3 objectPosition).magnitude and check if it is greater than the viewing distance

Take a look at this tutorial:

Unity Fog Of War Tutorial. Dynamic shader based fog of war