Changing Pixel Colors for Passing Objects

I’m creating a 2D platformer. The player will be in the center of the screen. Around him I would like to create a circular zone that changes the color of the ground on a per pixel basis around him. I would like the ground to be black when it is outside the zone and white inside the zone.

I am at an absolute loss on how to accomplish this. Any and all advice would be greatly appreciated.

If you require any additional information, please don’t hesitate to ask.


I had thought of using a light, however, I was not sure how to make the surrounding ground completely black (the background will be all black too), until it hits the light, and is illuminated as white.

In terms of the shadow, the issue with that is that I want platforms above, to the side, etc., not just below.

For instance, say if the player jumps, he will reveal a platform above him that he would not see if he was simply standing.

As I fell asleep, I realized that a “fog of war” mechanic might work well for that, but I wasn’t sure.