PointLightComponent struct in Thread

Omnidirectional light at the entity's position. Standard 1 / (1 + L·d + Q·d²) attenuation.

Properties

ColorThread::Vec3Linear RGB. Default {1, 1, 1}.
IntensityfloatOutput multiplier. Default 1.0.
RadiusfloatCut-off distance in metres. Default 10.0.
CastShadowsboolShadow from this light: six 90° depth maps packed into one atlas. The scene shadows the first point light that asks. Default false.
ShadowBiasfloatDepth offset against shadow acne. Default 0.005.
ShadowSoftnessfloatPenumbra radius in shadow-map texels; 0 = hard. Default 4.0.
EnabledboolToggle the light without removing it.

Example

Entity torch = scene->CreateEntity("Torch");
torch.GetComponent<Thread::TransformComponent>().Translation = { 2.0f, 1.5f, 0.0f };
auto& pl = torch.AddComponent<Thread::PointLightComponent>();
pl.Color     = { 1.0f, 0.55f, 0.2f };
pl.Intensity = 3.0f;
pl.Radius    = 8.0f;

PointLightComponent struct w Thread

Światło świecące we wszystkich kierunkach z pozycji encji. Standardowe tłumienie 1 / (1 + L·d + Q·d²).

Właściwości

ColorThread::Vec3Liniowe RGB. Domyślnie {1, 1, 1}.
IntensityfloatMnożnik jasności. Domyślnie 1.0.
RadiusfloatOdległość odcięcia w metrach. Domyślnie 10.0.
CastShadowsboolCień od tego światła: sześć map głębi 90° w jednym atlasie. Scena cieniuje pierwsze światło punktowe, które o to prosi. Domyślnie false.
ShadowBiasfloatPrzesunięcie głębi przeciw „shadow acne”. Domyślnie 0.005.
ShadowSoftnessfloatPromień półcienia w tekselach mapy cieni; 0 = ostry. Domyślnie 4.0.
EnabledboolWłącza/wyłącza światło bez usuwania komponentu.

Przykład

Entity torch = scene->CreateEntity("Torch");
torch.GetComponent<Thread::TransformComponent>().Translation = { 2.0f, 1.5f, 0.0f };
auto& pl = torch.AddComponent<Thread::PointLightComponent>();
pl.Color     = { 1.0f, 0.55f, 0.2f };
pl.Intensity = 3.0f;
pl.Radius    = 8.0f;