Renvix Assets

Installation

Requirements

Unity6 (6000.0) or newer
Render pipelineUniversal Render Pipeline, 2D Renderer or Universal Renderer
PackagesBurst, Collections, Mathematics

Import the package

  1. Open Window > Package Manager, select My Assets and find Vision Fog.
  2. Click Download, then Import.
  3. In the import window keep everything selected. The Demo folder is optional: leave it out if you do not need the examples.

The package is imported into Assets/VisionFog.

FolderContents
RuntimeThe components, shaders and the renderer feature
EditorInspectors, the fog area tool and setup checks
DemoDemo scenes, scripts, sprites and sounds
TestsEdit mode tests

Vision Fog needs the Burst, Collections and Mathematics packages. If one of them is missing, install it from Window > Package Manager > Unity Registry.

Add the renderer feature

The fog is drawn by the Vision Fog Renderer Feature. Add it to the renderer your camera uses:

  1. Find the renderer asset in your project. In the Universal 2D template it is the 2D Renderer in Assets/Settings; in the 3D template there is one per quality level, such as PC_Renderer and Mobile_Renderer.
  2. Select it and click Add Renderer Feature > Vision Fog Renderer Feature at the bottom of the Inspector.
  3. If your project uses several renderers (one per quality level, or different ones for different cameras), add the feature to each of them.

Inspector of a 2D Renderer asset with Vision Fog Renderer Feature added in the Renderer Features list.

Without the feature, Fog Of War falls back to a simple overlay. Some features need the renderer feature:

With renderer featureFallback overlay
Color styleYesYes
Texture styleYesYes
Blur styleYesNo
3D: fog on geometryYesNo

In Play mode, a Fog Of War that is drawn with the fallback shows a message in its Inspector.

The feature draws the fog before post-processing, so bloom and color grading apply on top of it. UI on a canvas in Screen Space - Overlay mode stays above the fog. UI on a Screen Space - Camera or World Space canvas is part of the rendered scene and gets covered by the fog.

Check the installation

Open a demo scene from Assets/VisionFog/Demo and press Play. You should see the fog, and the vision cones should stop at walls. If something is not set up right, the Vision Fog inspectors show a message, and most messages are generally clear.