I know very little about shading languages, so please forgive any apparent ignorance. I have been struggling with Volume Scatter (VS) in a vain attempt to produce a small amount of atmospheric perspective (aka haze) in a scene with wide expanses of open air between the principal objects in the scene. VS seems much too heavy-handed a solution and introduces swarms of fireflies.
It occurred to me that it might be possible to add a slight haze effect to surface shaders, as in many cases that is the only place the effect is noticeable, generally with a reduction in saturation, a hue shift based on the type of haze or time of day (for example), and an overall flattening of contrast. While these effects could likely be produced using existing nodes, I thought it more efficient to have a single node with a set of standard parameters, and geared to also take into account changes in distance between an object with this shader & the active camera, so it can automatically fade out its effect when the camera nears the subject.
Does this sound like something OSL might be able to tackle?