Interface IAmbientManager
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
This is the system that manages the worlds ambient settings, such as fog color/density and clouds. The ambient manager basically blends ambientmodifiers on top of each other to generate the final ambient values. Blending is in order how the modifiers are held in CurrentModifiers in the likes of float weight = modifier.FogMin.Weight; BlendedFogMin = w * modifier.FogMin.Value + (1 - w) * BlendedFogMin;
public interface IAmbientManager
- Extension Methods
Properties
Base
The base value or background ambient to overlay everything onto
AmbientModifier Base { get; }
Property Value
BlendedAmbientColor
The blended ambient color, calculated every frame from the list of modifiers
Vec3f BlendedAmbientColor { get; }
Property Value
BlendedCloudBrightness
The blended cloud brightness, calculated every frame from the list of modifiers
float BlendedCloudBrightness { get; }
Property Value
BlendedCloudDensity
The blended cloud density, calculated every frame from the list of modifiers
float BlendedCloudDensity { get; }
Property Value
BlendedFlatFogDensity
The blended flat fog density, calculated every frame from the list of modifiers
float BlendedFlatFogDensity { get; set; }
Property Value
BlendedFlatFogYOffset
The blended flat fog y-offset, calculated every frame from the list of modifiers
float BlendedFlatFogYOffset { get; set; }
Property Value
BlendedFlatFogYPosForShader
BlendedFlatFogYPos + SeaLevel - MainCamera.TargetPosition.Y
float BlendedFlatFogYPosForShader { get; set; }
Property Value
BlendedFogBrightness
float BlendedFogBrightness { get; }
Property Value
BlendedFogColor
The blended fog color, calculated every frame from the list of modifiers
Vec4f BlendedFogColor { get; }
Property Value
BlendedFogDensity
The blended fog density, calculated every frame from the list of modifiers
float BlendedFogDensity { get; }
Property Value
BlendedFogMin
The blended fog min, calculated every frame from the list of modifiers
float BlendedFogMin { get; }
Property Value
BlendedSceneBrightness
float BlendedSceneBrightness { get; }
Property Value
CurrentModifiers
The list of modifiers that result in the blended values
OrderedDictionary<string, AmbientModifier> CurrentModifiers { get; }
Property Value
Methods
UpdateAmbient(float)
The update loop for this manager. Runs every frame.
void UpdateAmbient(float dt)
Parameters
dt
floatthe Delta or change in Time