Im working on a grid-based game for unity and I plan to have some form of fog of war for the different rooms within the map.
I made a script that automatically generates a plane for each room acording to its shape. Since im working with grids, all planes will be euclidean and composed of multiple 90º angles.
Below you can see an example of the kind of planes that will compose a map.
Im interested in creating a shader that will mask the edges of these planes so that they can have a fog effect on the side and remain opaque in the center. Of couse, solutions such as freshnel wont work because I dont have any kind of curvature here. How could I create such shader?