API Reference · Lights

DirectionalLight

Namespace: Ava3D

public sealed class DirectionalLight : Light

A light with a direction but no position: the sun, and anything else far enough away that its rays arrive parallel.

Properties

MemberDescription
float Ambient { get; set; }

A flat floor of light added regardless of which way a surface faces, 0..1.

This is on top of EnvironmentLight, which is where ambient light with any direction to it now comes from. The floor is kept low on purpose: it exists so nothing is ever pure black, and raising it flattens the shading the environment is providing.

Read from the first directional light in Scene.Lights only; the others do not each contribute a floor.

Vector3 AmbientColor { get; set; }

The colour of that floor, multiplied by DirectionalLight.Ambient. White by default, which is the untinted floor this control has always had.

A tint here is not decoration: an ambient floor lifted with the scene's own sky colour reads as light that failed to be modelled, and a neutral grey one reads as fog.

Vector3 Direction { get; set; }

The direction the light travels, in world space. Need not be normalised.

See also