# Sandbox.Fog

Authors a fog layer's distance, height and colour settings, with optional directional colour from a sky material.
Settings are resolved separately for each camera so scene sky colours follow that camera's visibility.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.BasePostProcess<T>](/api/Sandbox.BasePostProcess<T>)
- Modifiers: sealed

## Constructors

- [`Fog`](/api/Sandbox.Fog/.ctor)

## Properties

- [`AttenuationDistance`](/api/Sandbox.Fog/AttenuationDistance): Distance removing approximately 63 percent of background light, in engine units.
- [`Color`](/api/Sandbox.Fog/Color): Fog colour, or tint applied to the sky colour. Alpha does not control opacity.
- [`ColorSource`](/api/Sandbox.Fog/ColorSource): Constant colour, or directional colour sampled from a sky material.
- [`ComponentVersion`](/api/Sandbox.Fog/ComponentVersion)
- [`DistanceEnabled`](/api/Sandbox.Fog/DistanceEnabled): Whether distance fog contributes. Height fog can remain enabled independently.
- [`DistanceRange`](/api/Sandbox.Fog/DistanceRange): Start and end distances of the artistic fog ramp, in engine units.
- [`FalloffExponent`](/api/Sandbox.Fog/FalloffExponent): Exponent of the artistic distance ramp.
- [`FogEnabled`](/api/Sandbox.Fog/FogEnabled): Whether this layer draws fog. False explicitly suppresses fog; disabling the component instead inherits surrounding fog.
- [`HeightColor`](/api/Sandbox.Fog/HeightColor): Height fog color or sky tint. Alpha sets its maximum opacity independently of distance fog.
- [`HeightColorSource`](/api/Sandbox.Fog/HeightColorSource): Constant color, or directional color sampled from a sky independently of distance fog.
- [`HeightEnabled`](/api/Sandbox.Fog/HeightEnabled): Draw a height gradient independently of distance fog.
- [`HeightExponent`](/api/Sandbox.Fog/HeightExponent): Curve applied to the height gradient, independently of the distance curve.
- [`HeightGradientLength`](/api/Sandbox.Fog/HeightGradientLength): World distance from full fog to clear. Positive fades upward; negative fades downward. Zero creates a hard boundary at HeightOffset.
- [`HeightOffset`](/api/Sandbox.Fog/HeightOffset): Offset above the GameObject's world Z position where height fog reaches full opacity.
- [`HeightSky`](/api/Sandbox.Fog/HeightSky): Sky material used by height fog's Custom Sky source. Missing textures use the constant color.
- [`HeightSkyBlur`](/api/Sandbox.Fog/HeightSkyBlur): Blur applied to the height fog sky source, independently of distance fog.
- [`IsCameraEffect`](/api/Sandbox.Fog/IsCameraEffect): Fog supplies material settings during camera preparation without drawing a fullscreen pass.
- [`MaxDistance`](/api/Sandbox.Fog/MaxDistance): Distance used to evaluate background fog where the sky has no finite surface depth.
- [`MaximumOpacity`](/api/Sandbox.Fog/MaximumOpacity): Upper limit on distance fog opacity, independent of the colour's alpha.
- [`Mode`](/api/Sandbox.Fog/Mode): Distance uses an artistic start/end ramp; exponential uses a physically defined attenuation distance.
- [`Sky`](/api/Sandbox.Fog/Sky): Sky material used by Custom Sky. Missing textures fall back to the constant colour.
- [`SkyAffect`](/api/Sandbox.Fog/SkyAffect): How strongly fog covers the sky, independently of using sky colours for fog.
- [`SkyBlur`](/api/Sandbox.Fog/SkyBlur): Blur applied when sampling sky colours, or the near blur when the distance ramp is enabled.
- [`SkyBlurDistanceEnabled`](/api/Sandbox.Fog/SkyBlurDistanceEnabled): Vary sky blur with distance instead of using a fixed value.
- [`SkyBlurDistanceRange`](/api/Sandbox.Fog/SkyBlurDistanceRange): Distances where sky blur starts and finishes changing, in world units.
- [`SkyBlurFar`](/api/Sandbox.Fog/SkyBlurFar): Sky blur at the end of the ramp. Values below SkyBlur sharpen with distance; values above it blur with distance.
- [`StartDistance`](/api/Sandbox.Fog/StartDistance): Distance from the camera before exponential fog starts, in engine units. Distance is measured in three dimensions.
- [`SunFadeDistance`](/api/Sandbox.Fog/SunFadeDistance): Distance over which sun lighting smoothly fades in. Zero gives a hard start; negative values reverse the fade.
- [`SunIntensity`](/api/Sandbox.Fog/SunIntensity): Multiplier for the dominant sun's color. Reduce this when the sky texture already contains a bright sun.
- [`SunLightingEnabled`](/api/Sandbox.Fog/SunLightingEnabled): Add an unshadowed sun-facing glow to distance fog, independently of volumetric lighting.
- [`SunLobeWidth`](/api/Sandbox.Fog/SunLobeWidth): Angle from the sun where the glow reaches half intensity, in degrees. Larger angles give a broader glow.
- [`SunSaturation`](/api/Sandbox.Fog/SunSaturation): Sun glow saturation. Zero is greyscale, one preserves the light's color, and higher values strengthen it.
- [`SunStartDistance`](/api/Sandbox.Fog/SunStartDistance): Distance from the camera where the sun glow starts fading in, in world units.

## Methods

- [`Render`](/api/Sandbox.Fog/Render): Blend each owner's complete settings once, preserving the unresolved legacy fog share.
