So I've got a 'Cloud layer v3' that get's fed by the usual Density Fractal (Cloud Fractal Shader v3) to shape some clouds. The Density Fractal has a Distant Shader plugged in the 'Mask Shader' port. A Camera is used as a location device to position the centre of the Distance shader.
I basically want to limit the coverage of the clouds to a smallish circular area in the sky, so that I can combine it with another cloud layer node (that has the same mask, but its polarity reversed).
As soon as I connect the Distance Shader to the Density Fractal, the clouds indeed get masked to the circular area as defined by the Far/Near settings in the 'Distance Shader'. Unfortunately, the entire area outside of this mask now gets filled in by what can best be described as... smog? (See attachment) That is to say that the entire sky itself is now totally occluded by said smog. It is completely opaque. This is NOT what I want, nor expected because it means not only does it cover the sky, but also any other cloud layers above it.
Either I'm doing something wrong or this surely this must be a bug? If the former, how can I achieve what I am after?
In the animated gif I turned off the Atmosphere so you can very clearly see the sky in the image that is not using the Distance shader as a mask. In the other image the Distance shader is connected but the black of the sky disappears behind said layer of smog.