Implementation of the top down field of view system.
Here is the unity version tutorial.
Use ray casting to calculate the field of view, then generate a procedural mesh as a stencil,
finally use the stencil to darken pixel during post processing.
- capsulate it as a component
- hide enemy out side the view
- find a better way when using perspective camera