Fogclass
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.
Constructors1
Showing 1 constructors
public Fog()
No results match this filter.
Methods1
Showing 1 methods
public virtual void Render()
Blend each owner's complete settings once, preserving the unresolved legacy fog share.
void—No results match this filter.
Properties33
Showing 33 properties
public float Sandbox.Fog.AttenuationDistance { get; set; }
Distance removing approximately 63 percent of background light, in engine units.
float—public Color Sandbox.Fog.Color { get; set; }
Fog colour, or tint applied to the sky colour. Alpha does not control opacity.
public Sandbox.FogColorSource Sandbox.Fog.ColorSource { get; set; }
Constant colour, or directional colour sampled from a sky material.
public virtual int Sandbox.Fog.ComponentVersion { get; set; }
int—public bool Sandbox.Fog.DistanceEnabled { get; set; }
Whether distance fog contributes. Height fog can remain enabled independently.
bool—public Vector2 Sandbox.Fog.DistanceRange { get; set; }
Start and end distances of the artistic fog ramp, in engine units.
public float Sandbox.Fog.FalloffExponent { get; set; }
Exponent of the artistic distance ramp.
float—public bool Sandbox.Fog.FogEnabled { get; set; }
Whether this layer draws fog. False explicitly suppresses fog; disabling the component instead inherits surrounding fog.
bool—public Color Sandbox.Fog.HeightColor { get; set; }
Height fog color or sky tint. Alpha sets its maximum opacity independently of distance fog.
public Sandbox.FogColorSource Sandbox.Fog.HeightColorSource { get; set; }
Constant color, or directional color sampled from a sky independently of distance fog.
public bool Sandbox.Fog.HeightEnabled { get; set; }
Draw a height gradient independently of distance fog.
bool—public float Sandbox.Fog.HeightExponent { get; set; }
Curve applied to the height gradient, independently of the distance curve.
float—public float Sandbox.Fog.HeightGradientLength { get; set; }
World distance from full fog to clear. Positive fades upward; negative fades downward. Zero creates a hard boundary at HeightOffset.
float—public float Sandbox.Fog.HeightOffset { get; set; }
Offset above the GameObject's world Z position where height fog reaches full opacity.
float—public Sandbox.Material Sandbox.Fog.HeightSky { get; set; }
Sky material used by height fog's Custom Sky source. Missing textures use the constant color.
public float Sandbox.Fog.HeightSkyBlur { get; set; }
Blur applied to the height fog sky source, independently of distance fog.
float—public virtual bool Sandbox.Fog.IsCameraEffect { get; set; }
Fog supplies material settings during camera preparation without drawing a fullscreen pass.
bool—public float Sandbox.Fog.MaxDistance { get; set; }
Distance used to evaluate background fog where the sky has no finite surface depth.
float—public float Sandbox.Fog.MaximumOpacity { get; set; }
Upper limit on distance fog opacity, independent of the colour's alpha.
float—public Sandbox.Rendering.FogMode Sandbox.Fog.Mode { get; set; }
Distance uses an artistic start/end ramp; exponential uses a physically defined attenuation distance.
public Sandbox.Material Sandbox.Fog.Sky { get; set; }
Sky material used by Custom Sky. Missing textures fall back to the constant colour.
public float Sandbox.Fog.SkyAffect { get; set; }
How strongly fog covers the sky, independently of using sky colours for fog.
float—public float Sandbox.Fog.SkyBlur { get; set; }
Blur applied when sampling sky colours, or the near blur when the distance ramp is enabled.
float—public bool Sandbox.Fog.SkyBlurDistanceEnabled { get; set; }
Vary sky blur with distance instead of using a fixed value.
bool—public Vector2 Sandbox.Fog.SkyBlurDistanceRange { get; set; }
Distances where sky blur starts and finishes changing, in world units.
public float Sandbox.Fog.SkyBlurFar { get; set; }
Sky blur at the end of the ramp. Values below SkyBlur sharpen with distance; values above it blur with distance.
float—public float Sandbox.Fog.StartDistance { get; set; }
Distance from the camera before exponential fog starts, in engine units. Distance is measured in three dimensions.
float—public float Sandbox.Fog.SunFadeDistance { get; set; }
Distance over which sun lighting smoothly fades in. Zero gives a hard start; negative values reverse the fade.
float—public float Sandbox.Fog.SunIntensity { get; set; }
Multiplier for the dominant sun's color. Reduce this when the sky texture already contains a bright sun.
float—public bool Sandbox.Fog.SunLightingEnabled { get; set; }
Add an unshadowed sun-facing glow to distance fog, independently of volumetric lighting.
bool—public float Sandbox.Fog.SunLobeWidth { get; set; }
Angle from the sun where the glow reaches half intensity, in degrees. Larger angles give a broader glow.
float—public float Sandbox.Fog.SunSaturation { get; set; }
Sun glow saturation. Zero is greyscale, one preserves the light's color, and higher values strengthen it.
float—public float Sandbox.Fog.SunStartDistance { get; set; }
Distance from the camera where the sun glow starts fading in, in world units.
float—No results match this filter.