I've also added some example code to show how this can be used with blending. This is a great template to build some advanced fog features on:
codeberg.org/BastiaanOlij...
codeberg.org
Add an option to blend between color and depth output to showcase how to use blending (which is commonly needed for compositor effects).