Blog

Development logs, design thoughts, and project updates

Unity Optimization: Speeding up FOVMapping bake time by 14x with Unity Burst Jobs and RaycastCommand

24 min read
The open-source FOVMapping library by StupaSoft is an excellent foundation for creating a realistic, obstacle-respecting fog of war in Unity, but it requires a lengthy single-threaded bake process. By completely refactoring the process to leverage RaycastCommand, the Job System, and Burst compilation, I successfully slashed the FOV map generation time by a factor of 10-14x. This post details the architectural shift—from a monolithic, nested loop to an efficient, concurrent wavefront—that unlocked massive parallelism for millions of raycasts.
Read More