Configuration & Optimizations
The Configuration and Optimizations group of the Fog Of War World inspector — settings that control when and how revealers are processed. Labels match the inspector; the code field name is noted where it differs. For the broader tuning guide, see Optimization.
Update Method
Controls where in the frame the fog work happens.
| Option | Description |
|---|---|
| Update | Work happens in Update. |
| Late Update | Work happens in LateUpdate. (Default.) |
| Start In Update, Finish in Late Update | Jobs start in Update and complete in LateUpdate, giving the Burst line-of-sight jobs the most time to run before being forced to finish. |
Tip
Start In Update, Finish in Late Update is often the fastest, because it lets the multithreaded line-of-sight jobs run across the frame instead of blocking.
Revealer Update Timing
(Code: RevealerUpdateMode) Controls how often revealers recalculate.
| Option | Description |
|---|---|
| Every Frame | Every revealer recalculates every frame. Most accurate, most expensive. |
| Time Spliced | Revealers take turns — only Num Revealers Per Frame recalculate each frame. (Default.) |
| Manual Updates | No revealer recalculates automatically; you drive updates in code with revealer.ManualCalculateLineOfSight(). |
| Property | Type | Default | Description |
|---|---|---|---|
| Num Revealers Per Frame | int (min 1) | 25 | How many revealers recalculate per frame when using Time Spliced. Code: MaxNumRevealersPerFrame. |
Spatial Acceleration
A spatial hash grid that keeps revealer/hider queries fast in large worlds.
| Property | Type | Default | Description |
|---|---|---|---|
| Use Spatial Acceleration? | bool | true | Enables the spatial hash grid. Code: UseSpatialAcceleration. |
| Grid Size | int | 32 | Size of each hash bucket, in world units. Ideal value ≈ 2× your average revealer radius. Code: SpatialHashGridSize. |
| Table Capacity | int | 1024 | Maximum number of buckets. More = fewer collisions but more memory. Larger worlds / smaller grid sizes need more. Code: NumSpatialHashBuckets. |
Staged GPU Uploads
Batches revealer GPU data and uploads it once at the end of the frame.
| Property | Type | Default | Description |
|---|---|---|---|
| Use Staged GPU Uploads? | bool | true | Defer revealer GPU uploads to the end of the frame and submit them in one batch. Code: UseStagedGPUUploads. |
| Scatter Compute Shader | ComputeShader | (auto-assigned) | The compute shader that scatters staged revealer data on the GPU. Code: ScatterRevealersShader. |
Important
When Use Staged GPU Uploads? is on, the Scatter Compute Shader must be assigned, or the system warns and falls back to the slower per-revealer path. It is auto-assigned by default.