API ReferenceSandbox.Rendering

FogSetupclass

A camera's fog settings. A zero weight preserves both legacy fog layers; an enabled override replaces their combined result before volumetric fog is applied. Use `default(FogSetup)` to inherit legacy fog; `new FogSetup()` creates a full-weight override.

object→FogSetup
Namespace
Sandbox.Rendering
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.Rendering.FogSetup

Constructors1

Showing 1 constructors

public FogSetup()PUBLICCONSTRUCTOR

Creates a full-weight exponential fog override with default settings. A zero-initialized default(FogSetup) instead preserves legacy fog.

Properties36

Showing 36 properties

public float Sandbox.Rendering.FogSetup.AttenuationDistance { get; set; }PUBLICGETSET

Distance removing 63.2 percent of background light, in world units.

Returns:float—

public float Sandbox.Rendering.FogSetup.BaseHeight { get; set; }PUBLICGETSET

World height where the height gradient reaches full opacity.

Returns:float—

public Color Sandbox.Rendering.FogSetup.Color { get; set; }PUBLICGETSET

Distance fog color and sky tint. Alpha is ignored; use MaximumOpacity instead.

Returns:Color—

public bool Sandbox.Rendering.FogSetup.DistanceEnabled { get; set; }PUBLICGETSET

Whether distance fog contributes, independently of height fog.

Returns:bool—

public bool Sandbox.Rendering.FogSetup.Enabled { get; set; }PUBLICGETSET

Whether this override adds fog. A disabled override with nonzero weight suppresses legacy fog.

Returns:bool—

public float Sandbox.Rendering.FogSetup.EndDistance { get; set; }PUBLICGETSET

Full-fog distance for the artistic distance model, in world units.

Returns:float—

public float Sandbox.Rendering.FogSetup.FalloffExponent { get; set; }PUBLICGETSET

Exponent applied to the artistic distance ramp.

Returns:float—

public Color Sandbox.Rendering.FogSetup.HeightColor { get; set; }PUBLICGETSET

Independent height fog color, with alpha controlling its maximum opacity.

Returns:Color—

public bool Sandbox.Rendering.FogSetup.HeightEnabled { get; set; }PUBLICGETSET

Enables the independent height gradient.

Returns:bool—

public float Sandbox.Rendering.FogSetup.HeightExponent { get; set; }PUBLICGETSET

Curve applied to the height gradient.

Returns:float—

public float Sandbox.Rendering.FogSetup.HeightFalloff { get; set; }PUBLICGETSET

Signed world distance from full height fog to clear. Zero creates a hard boundary.

Returns:float—

public float Sandbox.Rendering.FogSetup.HeightSkyBlur { get; set; }PUBLICGETSET

Cubemap blur, from the sharpest mip at zero to the coarsest mip at one.

Returns:float—

public float Sandbox.Rendering.FogSetup.HeightSkyContribution { get; set; }PUBLICGETSET

Blend between constant color and the tinted cubemap, from zero to one.

Returns:float—

public Sandbox.Rendering.FogSkyEncoding Sandbox.Rendering.FogSetup.HeightSkyEncoding { get; set; }PUBLICGETSET

Color encoding stored in the sky cubemap. Ordinary HDR and RGB textures use Rgb.

Returns:FogSkyEncoding—

public Rotation Sandbox.Rendering.FogSetup.HeightSkyRotation { get; set; }PUBLICGETSET

Rotation from world directions into the sky cubemap's local space.

Returns:Rotation—

public Sandbox.Texture Sandbox.Rendering.FogSetup.HeightSkyTexture { get; set; }PUBLICGETSET

Optional cubemap providing directional height fog color. Cube arrays use their first cube.

Returns:Texture—

public float Sandbox.Rendering.FogSetup.MaxDistance { get; set; }PUBLICGETSET

Distance used to evaluate sky fog, independent of the camera's far clip plane.

Returns:float—

public float Sandbox.Rendering.FogSetup.MaximumOpacity { get; set; }PUBLICGETSET

Upper limit on distance fog opacity, independent of color.

Returns:float—

public Sandbox.Rendering.FogMode Sandbox.Rendering.FogSetup.Mode { get; set; }PUBLICGETSET

Distance attenuation model.

Returns:FogMode—

public float Sandbox.Rendering.FogSetup.SkyAffect { get; set; }PUBLICGETSET

Additional opacity multiplier for sky pixels, from zero to one.

Returns:float—

public float Sandbox.Rendering.FogSetup.SkyBlur { get; set; }PUBLICGETSET

Cubemap blur, from the sharpest mip at zero to the coarsest mip at one.

Returns:float—

public bool Sandbox.Rendering.FogSetup.SkyBlurDistanceEnabled { get; set; }PUBLICGETSET

Use SkyBlur near the camera and SkyBlurFar beyond SkyBlurDistanceRange.

Returns:bool—

public Vector2 Sandbox.Rendering.FogSetup.SkyBlurDistanceRange { get; set; }PUBLICGETSET

Start and end distances of the sky blur ramp, in world units.

Returns:Vector2—

public float Sandbox.Rendering.FogSetup.SkyBlurFar { get; set; }PUBLICGETSET

Far sky blur, from the sharpest mip at zero to the coarsest mip at one.

Returns:float—

public float Sandbox.Rendering.FogSetup.SkyContribution { get; set; }PUBLICGETSET

Blend between constant color and the tinted cubemap, from zero to one.

Returns:float—

public Sandbox.Rendering.FogSkyEncoding Sandbox.Rendering.FogSetup.SkyEncoding { get; set; }PUBLICGETSET

Color encoding stored in the sky cubemap. Ordinary HDR and RGB textures use Rgb.

Returns:FogSkyEncoding—

public Rotation Sandbox.Rendering.FogSetup.SkyRotation { get; set; }PUBLICGETSET

Rotation from world directions into the sky cubemap's local space.

Returns:Rotation—

public Sandbox.Texture Sandbox.Rendering.FogSetup.SkyTexture { get; set; }PUBLICGETSET

Optional cubemap providing directional fog color. Cube arrays use their first cube.

Returns:Texture—

public float Sandbox.Rendering.FogSetup.StartDistance { get; set; }PUBLICGETSET

Clear distance before fog starts, in world units.

Returns:float—

public float Sandbox.Rendering.FogSetup.SunFadeDistance { get; set; }PUBLICGETSET

Distance over which sun lighting smoothly fades in. Zero gives a hard start; negative values reverse the fade.

Returns:float—

public float Sandbox.Rendering.FogSetup.SunIntensity { get; set; }PUBLICGETSET

Multiplier for the dominant sun's color, independent of its volumetric fog strength.

Returns:float—

public bool Sandbox.Rendering.FogSetup.SunLightingEnabled { get; set; }PUBLICGETSET

Add an unshadowed glow from the view's dominant sun to distance fog.

Returns:bool—

public float Sandbox.Rendering.FogSetup.SunLobeWidth { get; set; }PUBLICGETSET

Angle from the sun at half intensity, in degrees.

Returns:float—

public float Sandbox.Rendering.FogSetup.SunSaturation { get; set; }PUBLICGETSET

Sun glow saturation. Zero is greyscale, one preserves the light's color, and higher values strengthen it.

Returns:float—

public float Sandbox.Rendering.FogSetup.SunStartDistance { get; set; }PUBLICGETSET

Distance from the camera where the sun glow starts fading in, in world units.

Returns:float—

public float Sandbox.Rendering.FogSetup.Weight { get; set; }PUBLICGETSET

Influence over the legacy gradient and cubemap fog result, from zero to one.

Returns:float—

On this page

Constructorspublic FogSetup()Propertiespublic System.Single Sandbox.Rendering.FogSetup.AttenuationDistance { get; set; }public System.Single Sandbox.Rendering.FogSetup.BaseHeight { get; set; }public Color Sandbox.Rendering.FogSetup.Color { get; set; }public System.Boolean Sandbox.Rendering.FogSetup.DistanceEnabled { get; set; }public System.Boolean Sandbox.Rendering.FogSetup.Enabled { get; set; }public System.Single Sandbox.Rendering.FogSetup.EndDistance { get; set; }public System.Single Sandbox.Rendering.FogSetup.FalloffExponent { get; set; }public Color Sandbox.Rendering.FogSetup.HeightColor { get; set; }public System.Boolean Sandbox.Rendering.FogSetup.HeightEnabled { get; set; }public System.Single Sandbox.Rendering.FogSetup.HeightExponent { get; set; }public System.Single Sandbox.Rendering.FogSetup.HeightFalloff { get; set; }public System.Single Sandbox.Rendering.FogSetup.HeightSkyBlur { get; set; }public System.Single Sandbox.Rendering.FogSetup.HeightSkyContribution { get; set; }public Sandbox.Rendering.FogSkyEncoding Sandbox.Rendering.FogSetup.HeightSkyEncoding { get; set; }public Rotation Sandbox.Rendering.FogSetup.HeightSkyRotation { get; set; }public Sandbox.Texture Sandbox.Rendering.FogSetup.HeightSkyTexture { get; set; }public System.Single Sandbox.Rendering.FogSetup.MaxDistance { get; set; }public System.Single Sandbox.Rendering.FogSetup.MaximumOpacity { get; set; }public Sandbox.Rendering.FogMode Sandbox.Rendering.FogSetup.Mode { get; set; }public System.Single Sandbox.Rendering.FogSetup.SkyAffect { get; set; }public System.Single Sandbox.Rendering.FogSetup.SkyBlur { get; set; }public System.Boolean Sandbox.Rendering.FogSetup.SkyBlurDistanceEnabled { get; set; }public Vector2 Sandbox.Rendering.FogSetup.SkyBlurDistanceRange { get; set; }public System.Single Sandbox.Rendering.FogSetup.SkyBlurFar { get; set; }public System.Single Sandbox.Rendering.FogSetup.SkyContribution { get; set; }public Sandbox.Rendering.FogSkyEncoding Sandbox.Rendering.FogSetup.SkyEncoding { get; set; }public Rotation Sandbox.Rendering.FogSetup.SkyRotation { get; set; }public Sandbox.Texture Sandbox.Rendering.FogSetup.SkyTexture { get; set; }public System.Single Sandbox.Rendering.FogSetup.StartDistance { get; set; }public System.Single Sandbox.Rendering.FogSetup.SunFadeDistance { get; set; }public System.Single Sandbox.Rendering.FogSetup.SunIntensity { get; set; }public System.Boolean Sandbox.Rendering.FogSetup.SunLightingEnabled { get; set; }public System.Single Sandbox.Rendering.FogSetup.SunLobeWidth { get; set; }public System.Single Sandbox.Rendering.FogSetup.SunSaturation { get; set; }public System.Single Sandbox.Rendering.FogSetup.SunStartDistance { get; set; }public System.Single Sandbox.Rendering.FogSetup.Weight { get; set; }Metadata