Age of Empire Mini Map

If anyone played this game before, you know that the minimap starts out black, and only revealing areas the player has units at. Areas the player explored will maintain revealed, but a fog of war shadow will be casted over it.

Im trying to create a mini map like that, and the way Im planning to go about is to set up 3 layers of images. The bottom one being the actual map, then the fog in the middle, and a black texture on top.

If the player is colliding with a pixel, the black pixels will turn transparent permanently, while the fog pixels will stay transparent only if they are colliding.

My question is, how can I access the coordinate of the pixel that my player is colliding with? I know RaycastHit.textureCoord can locate a single pixel, but if my player is larger than one pixel (which it will obviously be), then I need all the pixels my player is colliding with, is there a way to do this?

If there is another to do the minimap, that will help too.

If you know the coordinate of the center of the player, and the distance from the player that you want to be revealed at all times (radius), you can iterate over all of the pixels that are currently within sight of the player with a double for loop; here’s some pseudocode:

for (x = playerX - radius; x <= playerX + radius; x += 1/textureWidth) {
    for (y = playerY - radius; y <= playerY + radius; y += 1/textureHeight) {
        if (distance from (x,y) to (playerX,playerY) <= radius) {
            /* the pixel at texture coordinate (x,y) has been uncovered */
        }
    }
}

Then you could clear the pixel at that location in the black texture and the fog pixels, and at the beginning of the next frame set the entire fog texture to the default color.