Ambient Settings

Enumerations

AmbientSource
Values:
  • SkyColor = 0 - Use skybox as source of ambient light.

  • ConstColor = 1 - Use ambientColor as source of ambient light.

Classes

AmbientSettings : NativeComponent

This component is used to setup source and strength of the ambient light.

To use this component, add the following line to your project file:

require engine.core_components.ambient_settings_component // or require engine.core

Usage example:

let setting = create_render_settings()
get_component(renderSettings) $(var ambient : AmbientSettings?) {
    ambient.ambientColor = float3(0.95, 0.5, 0.7)
    ambient.ambientStrength = 1f
    ambient.ambientSource = AmbientSource.ConstColor
}
Properties:

AmbientSettings.ambientColor: float3
AmbientSettings.ambientColor =(value: float3)

The color of the ambient light. Only used if ambientSource is set to ConstColor. Default is (1, 1, 1)

Arguments:
  • value : float3

AmbientSettings.ambientStrength: float
AmbientSettings.ambientStrength =(value: float)

The strength of the ambient light. Default is 0.15

Arguments:
  • value : float

AmbientSettings.ambientSource: AmbientSource
AmbientSettings.ambientSource =(value: AmbientSource)

The type of the ambient light source. Default is SkyColor

Arguments: