Creating FOG

So I’ve been playing this game called Moss, and it has beautiful baked shadows and textures.
In addition to that, it also has fog, which makes the game much more immersive.

I’ve been wondering on how to create fog based by distance inside of Spark AR.
I’m aware of stacking planes, but I think there must be a better solution.

Here’s a screenshot.


You can use a camera distance shader on the materials to mix a color with the base texture. Here’s a basic implementation. You can tweak the power and from range depending on the size of your scene.

You could also try using the depth texture, but it’s a little unreliable.


Thank you so much @josh_beckwith, have been learning a LOT with you!

1 Like