Here is a technique we used on Gears 5 to store 3D information in a single sample of a 3D texture. I'm keen to push this further as there are potentially a lot of good wins in regards to memory and performance.
The height is stored in the red and green channels of a texture and we used the blue and alpha channels to store the falloff and density.
With 2 layers of vector noise what have one distorting the other we can generate a bunch of information to modify and distort the resulting volumetric data.
When we use this data to drive the extinction and albedo values of a volumetric material in UE4 we get a very efficient solution for painting fog into the world.
This ended up being fast enough for us to update it dynamically 🙂
Originally tweeted by James Sharpe (@_JamesSharpe_) on 15/08/2020.