Skip to content

EntropyCanvas::Light

Light component for scene illumination. More…

#include <Light.h>

Name
Lightspot(float coneAngle, float intensity =1.0f, glm::vec3 color =glm::vec3(1.0f))
Create spot light (sphere with shaping).
LightsphereArea(float radius, float intensity =1.0f, glm::vec3 color =glm::vec3(1.0f))
Create sphere light with radius (area light).
Lightsphere(float intensity =1.0f, glm::vec3 color =glm::vec3(1.0f))
Create default sphere/point light.
Lightdistant(float intensity =1.0f, glm::vec3 color =glm::vec3(1.0f))
Create distant/directional light (sun-like).
ENTROPY_REGISTER_TYPE(Light )
ENTROPY_FIELD_EXTENSION(float , range )
ENTROPY_FIELD_EXTENSION(float , bounceFactor )
ENTROPY_FIELD_EXTENSION(bool , castsShadows )
ENTROPY_FIELD_EXTENSION(uint32_t , shadowResolution )
ENTROPY_FIELD_EXTENSION(uint32_t , shadowCascadeCount )
ENTROPY_FIELD(LightType , lightType )
ENTROPY_FIELD(glm::vec3 , color )
ENTROPY_FIELD(float , intensity )
virtualENTROPY_FIELD(float , exposure ) =0
ENTROPY_FIELD(bool , enableColorTemperature )
ENTROPY_FIELD(float , colorTemperature )
ENTROPY_FIELD(float , diffuse )
ENTROPY_FIELD(float , specular )
ENTROPY_FIELD(bool , normalize )
virtualENTROPY_FIELD(float , radius ) =0
virtualENTROPY_FIELD(float , angle ) =0
ENTROPY_FIELD(float , shapingConeAngle )
virtualENTROPY_FIELD(float , shapingConeSoftness ) =0
virtualENTROPY_FIELD(float , shapingFocus ) =0
ENTROPY_FIELD(glm::vec3 , shapingFocusTint )
Name
ENTROPY_SKIP_USD_SCHEMA
struct EntropyCanvas::Light;

Light component for scene illumination.

Aligned with USD Lux schema (https://openusd.org/release/api/usd_lux_page_front.html).

  • Sphere lights: Point/area lights with radius; use ShapingAPI fields for spot behavior
  • Distant lights: Directional lights with angular size

Properties are individually addressable via PropertyRegistry for efficient network synchronization (using ENTROPY_FIELD macros).

Direction is derived from the entity’s Transform component.

static inline Light spot(
float coneAngle,
float intensity =1.0f,
glm::vec3 color =glm::vec3(1.0f)
)

Create spot light (sphere with shaping).

static inline Light sphereArea(
float radius,
float intensity =1.0f,
glm::vec3 color =glm::vec3(1.0f)
)

Create sphere light with radius (area light).

static inline Light sphere(
float intensity =1.0f,
glm::vec3 color =glm::vec3(1.0f)
)

Create default sphere/point light.

static inline Light distant(
float intensity =1.0f,
glm::vec3 color =glm::vec3(1.0f)
)

Create distant/directional light (sun-like).

ENTROPY_REGISTER_TYPE(
Light
)
ENTROPY_FIELD_EXTENSION(
float ,
range
)
ENTROPY_FIELD_EXTENSION(
float ,
bounceFactor
)
ENTROPY_FIELD_EXTENSION(
bool ,
castsShadows
)
ENTROPY_FIELD_EXTENSION(
uint32_t ,
shadowResolution
)
ENTROPY_FIELD_EXTENSION(
uint32_t ,
shadowCascadeCount
)
ENTROPY_FIELD(
LightType ,
lightType
)
ENTROPY_FIELD(
glm::vec3 ,
color
)
ENTROPY_FIELD(
float ,
intensity
)
virtual ENTROPY_FIELD(
float ,
exposure
) =0
ENTROPY_FIELD(
bool ,
enableColorTemperature
)
ENTROPY_FIELD(
float ,
colorTemperature
)
ENTROPY_FIELD(
float ,
diffuse
)
ENTROPY_FIELD(
float ,
specular
)
ENTROPY_FIELD(
bool ,
normalize
)
virtual ENTROPY_FIELD(
float ,
radius
) =0
virtual ENTROPY_FIELD(
float ,
angle
) =0
ENTROPY_FIELD(
float ,
shapingConeAngle
)
virtual ENTROPY_FIELD(
float ,
shapingConeSoftness
) =0
virtual ENTROPY_FIELD(
float ,
shapingFocus
) =0
ENTROPY_FIELD(
glm::vec3 ,
shapingFocusTint
)
ENTROPY_SKIP_USD_SCHEMA;

Updated on 2026-01-26 at 17:14:35 -0500