Volumetric Fog in UE4

 

A demonstration of a raymarched volumetric fog effect I’ve been working on for a while.

The effect raymarches forward a certain distance, samples that point in world space, uses it to generate some noise (triangle noise is what the author of the shader on ShaderToy called it), and adds a specified color to it, which is blended with the scene texture based on the scene depth, so that nearby objects are still visible/not occluded.

Does face some issues with Translucency (always troubling in a Deferred rendering setup) and can be solved by placing the post-process effect before the Translucency step in the pipeline, at the cost of a performance hit.

Uses the Custom HLSL shader node in the Materials system.

Based on the ShaderToy shader found here:
https://www.shadertoy.com/view/XtfSWX

Advertisements