Skip to main content

Spectral Reapply Fog

Spectral Reapply Fog restores fog after you have processed the underlying scene color. It is the companion to Spectral Remove Fog, using the same fog data so both operations agree.

Use a Post Process material at Scene Color Before DOF. Read the Remove Fog setup for the complete graph and prerequisites.

Inputs, output, and properties​

ConnectionMeaning
Scene Color inputRequired RGB color after fog removal and your custom processing.
Color outputThe processed scene with fog lighting and attenuation restored. Connect to Emissive Color in the Post Process material.

There are no editable strength, density, quality, or UV properties. An unconnected Scene Color input causes a compilation error.

What it restores​

Reapply Fog first attenuates the supplied color according to the fog's transmission, then adds the fog's scattered light. In simple terms, the processed scene is seen through the original fog again.

It does not run a new fog simulation or recalculate the fog's lighting from your processed image. If you tint the scene between Remove and Reapply, the fog retains its original contribution. That separation is the purpose of the pair.

Example: change the scene without tinting the fog​

PostProcessInput0 → Remove Fog → Multiply by tint → Reapply Fog → Emissive Color

To affect both the scene and fog instead, the order of your processing would be different. Decide which part of the image should change before choosing where to place the operation.

Do not apply fog twiceWarning

Feeding the original fogged PostProcessInput0 straight into Reapply Fog applies fog to an image that already contains it. Remove fog first when following this workflow, and do not add a second manual fog contribution afterwards.

Checking the graph​

Start with Remove Fog connected directly to Reapply Fog, without your custom operation. The pair should broadly preserve the starting image on its supported path, apart from precision and dense-fog recovery limits. If it changes dramatically, check the material stage, scene input, and shader-hook setup before adding more processing.

The nodes use the fog for the current pixel. Moving scene content to another pixel does not move that fog sample with it. Avoid treating this pair as an automatic solution for UV-warping post effects.

When to rebake​

Changing this graph does not require rebaking lighting. The fog it restores can still depend on baked probe data, which must be rebuilt when the underlying scene lighting changes.