Partilhar via


Class LightComponentBase

Base class for all light components.

Attaching a light component to an Entity turns it into a dynamic light source that illuminates the geometry in addition to the global sky light. The position and orientation of the entity determines the location and direction of the light.

Only geometry that uses a PbrMaterial will be affected by this light. Geometry that has a ColorMaterial assigned generally receives no lighting.

class Microsoft::Azure::RemoteRendering::LightComponentBase : public Microsoft::Azure::RemoteRendering::ComponentBase

Properties

Color

The color of the light in Gamma color space.

The color's alpha channel is ignored.

auto GetColor() const noexcept -> Microsoft::Azure::RemoteRendering::Color4Ub;
auto SetColor(Microsoft::Azure::RemoteRendering::Color4Ub const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;

See also

Intensity

The overall brightness and range of the light.

This value has no physical unit, however, it can be considered to be proportional to the physical power of the light source.

For lights that have a falloff (SpotLightComponent and PointLightComponent), the intensity determines both brightness and range of influence. For infinite light sources (DirectionalLightComponent) it only determines the brightness.

At an intensity of 1000 a point light roughly has a range of 100 world units. However, note that this doesn't scale linearly.

A Result.InvalidParam error occurs if the value is negative, NaN or infinite.

auto GetIntensity() const noexcept -> float;
auto SetIntensity(float value) noexcept -> Microsoft::Azure::RemoteRendering::Status;

See also