skip to Main Content

Special Features (only Image Effect)

VR and Single Pass Stereo Rendering

Dynamic Fog & Mist fully supports VR and Single Pass Stereo Rendering. It has been tested with Oculus DK2 headset and both Oculus and OpenVR SDKs.

Important: if you enable Single Pass Stereo Rendering in Player Settings, make sure to review Dynamic Fog & Mist inspector on your camera and ensure the checkbox “Single Pass Stereo” shown at top of inspector is marked. This checkbox is automatically set based on the Player Settings so no need to change it, just ensure it reflects current player settings. Reason for this checkbox is that Unity does not provide a way to check if Single Pass Stereo is enabled at runtime (from scripts) so this redundant checkbox was added. Just make sure it’s in line with your Player Settings.

Fog Volumes

You can define special zones (fog volumes) where fog alpha will automatically change. Create a fog volume from the menu GameObject / Create Other / Fog Volume. Position the fog volume over the desired area, edit the collider bounds and set the desired fog alpha and transition duration in the inspector.

Fog of War

You can also set any number of void areas just calling SetFogOfWarAlpha method of the DynamicFog script. Just pass the world space position, the radius and the desired new alpha for the fog. Just make sure the center and size of the fog of war (configured in the inspector) are properly set (by default the fog of war is centered on 0,0,0 with a size of 1024×1024).

Texture Size defines the resolution of the fog of war transparency texture. Increase this size to improve the precision of the clearings.

Call ResetForOfWar to reset the cleared areas back to normal. Also GetFogOfWarAlpha gives you the value at any world space position.

You can also add fog of war holes by creating special “Dynamic Fog Of War Hole” objects. Right click in the hierarchy or select top menu GameObject -> Create Other -> Dynamic Fog -> Dynamic Fog of War Hole.

Gradient Fog

Dynamic Fog & Mist exposes two color selectors to create artistic fog gradients. Just experiment with them!

Back To Top