63 glm::vec4
color{1.0f, 1.0f, 1.0f, 1.0f};
66 ES_PROPERTY(animatable, min=0, tooltip=
"Brightness multiplier of the light.")
71 tooltip=
"Falloff reach in world units (Point / Spot).")
79 tooltip=
"Radius held at full strength before the falloff starts.")
87 tooltip=
"Falloff shape: 1 = linear, higher pools near the light, lower reaches further.")
96 tooltip=
"Fall off as 1/distance² in metres (a real lamp): intensity is the light 1 m away, radius only where it ends.")
105 tooltip=
"How much of this light its shadows remove (1 = all of it).")
114 tooltip=
"The lowest sprite layer this light reaches (default: every layer).")
119 tooltip=
"The highest sprite layer this light reaches (default: every layer).")
128 tooltip=
"A texture whose alpha shapes this light (a cookie).")
136 tooltip=
"Cookie size in world units; 0 = the light's own reach.")
140 ES_PROPERTY(animatable, min=0, max=180, unit=
"°", advanced, shown_when=type:
Spot)
144 ES_PROPERTY(animatable, min=0, max=180, unit=
"°", advanced, shown_when=type:
Spot)
153 tooltip=
"Shadow softness (light-source size); 0 = hard edge.")
161 tooltip=
"Angular size of a Directional light's source (the sun is 0.53); 0 = hard edge.")
168 tooltip=
"Directional shadow distance; 0 = no directional shadow.")
176 tooltip=
"Cast a shadow map over 3D meshes (Directional, Spot, Point).")
183 tooltip=
"Shadow map coverage radius; 0 = fit the view.")
187 tooltip=
"Where a sun's cascades are cut: 0 = evenly along the view, 1 = each cascade a fixed multiple farther (sharpest near the camera).")
191 tooltip=
"Shadow map texels a surface is moved toward the light and off itself before it is tested: more removes acne, too much lifts the shadow off its caster.")
195 tooltip=
"The least light a grazed surface is treated as facing, which caps the extra bias it gets: lower clears acne on walls the light skims, higher keeps their shadows attached.")
204 tooltip=
"Take direction and strength from the environment's sun, and light the sky without it.")
213 tooltip=
"With Follow Environment Sun: aim by this light's Transform, not by the panorama.")
222 tooltip=
"Baked environment (.esenv) this Ambient light casts.")
230 tooltip=
"Turn the environment about the up axis, in degrees.")
238 tooltip=
"Draw this environment as the sky behind the scene.")
246 tooltip=
"Scale what baked reflection probes show (1 = as baked).")
255 tooltip=
"Scale the light the environment gives surfaces, not what they reflect of it (1 = as the sky gives it).")
260 tooltip=
"Tint the light the environment gives surfaces, not what they reflect of it (white = as the sky gives it).")
266 tooltip=
"How much colour baked reflection probes keep (0 = grey).")
275 tooltip=
"Multiply baked indirect light (lightmaps, probe volumes) by this colour (1 = as baked).")
283 tooltip=
"Light from above in Color, from below in Ground Color, blended by which way a surface faces.")
289 tooltip=
"The ambient colour a surface facing straight down receives (Hemisphere).")
309 ES_PROPERTY(asset = probeVolume, tooltip=
"Baked probe grid (.esprobes) filling this box.")
315 ES_PROPERTY(tooltip=
"Fill this box at run time from a capture at its centre (the room as lit now), not from a bake.")
320 ES_PROPERTY(min=0, shown_when=capture:
true, tooltip=
"Seconds between captures (0 = once). Each one adds a bounce.")
324 ES_PROPERTY(min=0, tooltip=
"Half the box this volume covers, from the entity's position.")
330 ES_PROPERTY(min=1, tooltip=
"World units between probes the next bake lays down.")
Type-safe resource handle system.
Math utilities and GLM configuration for ESEngine.
Reflection and metadata system for automatic binding generation.
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
#define ES_ENUM(...)
Mark an enum that should be exposed to scripts.
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
Core type definitions and utilities for ESEngine.
LightType
2D light kind. Point uses the Transform position + radius falloff; Directional uses the Transform's f...
std::int32_t i32
Signed 32-bit integer.
float f32
32-bit floating point
A box of baked irradiance: the light for what a bake cannot hold still.
f32 spacing
World units a bake puts between probes. What the BAKE reads — the grid it produced carries its own re...
resource::ProbeVolumeHandle probes
The grid this box is read through. Invalid = nothing baked yet, which leaves everything inside lit ex...
f32 captureInterval
Seconds between captures; 0 captures once. Each lit view of the room includes the last capture's fill...
bool enabled
Disabled volumes are skipped during collection.
glm::vec3 halfExtents
Half the box's size, in world units, from the entity's position.
bool capture
Fill the box at run time from what a camera at its centre sees, all round: the walls as the lights li...
A 2D light contributing to Lit-shaded materials.
f32 environmentRotation
Turn the environment about +Y, in degrees. One number turns all three of it — sky,...
i32 layerMin
The lowest sprite layer this light reaches. A sprite on a layer below it is not lit by this light,...
i32 type
Light kind: 0 = Point, 1 = Directional, 2 = Ambient (see LightType).
bool followEnvironmentSun
Be the sun of the frame's environment. The direction and strength come from the panorama,...
glm::vec2 cookieSize
How big cookie is drawn, in world units. 0 on an axis covers the light's own reach on it — a square o...
bool drawEnvironment
Draw environment as the background as well as reflecting it. Off by default, so a scene that adopts a...
f32 innerRadius
How far the light stays at full strength before it starts falling off, in world units....
f32 shadowSoftness
Shadow penumbra softness = the light source's half-extent in world units; 0 is a hard edge (default)....
f32 radius
Point/Spot falloff radius in world units (ignored by Directional/Ambient).
bool meshShadows
Casts a shadow map over 3D meshes. Every type but Ambient can: a sun's map is cascades over the view,...
glm::vec4 groundColor
What a surface facing straight down receives with hemisphere on. Scaled by intensity,...
f32 innerAngle
Spot inner cone angle in degrees (full angle; fully lit inside).
f32 shadowDistance
Directional-light shadow reach in world units: how far its shadows are carried from whatever cast the...
bool inverseSquare
Falls off as the inverse square of the distance, in metres, as a real light does (glTF's and three....
f32 reflectionScale
What baked reflection probes show, scaled. A probe was baked under one sky, so it goes on showing tha...
bool hemisphere
Make this Ambient light two colours: color from above, groundColor from below, blended by which way a...
f32 sourceAngle
How wide a Directional light's source is, as the angle it subtends — the full angular diameter in deg...
glm::vec4 diffuseTint
The colour diffuseScale's light is tinted by, authored as color is. White = as the sky gives it.
f32 outerAngle
Spot outer cone angle in degrees (full angle; fades to dark by here).
i32 layerMax
The highest sprite layer this light reaches. See layerMin.
f32 falloff
The shape of the falloff between innerRadius and radius, as the power the linear ramp is raised to....
f32 shadowStrength
How much of this light a shadow takes away, 0..1. 1 (the default) is the whole of it; 0....
bool aimFollowedSun
With followEnvironmentSun, aim this light by its own Transform instead of by where the panorama's sun...
f32 diffuseScale
What the light this Ambient light's environment gives a surface (its diffuse half,...
glm::vec4 bakedTint
What baked INDIRECT light (a lightmap, a probe volume) is multiplied by. A bake holds the light of on...
glm::vec4 color
Light color, multiplied by intensity. RGBA for editor color-picker consistency with every other engin...
f32 intensity
Light strength multiplier.
f32 reflectionSaturation
How much colour baked reflections keep: 1 as baked, 0 grey. An overcast sky drains colour from what i...
f32 shadowExtent
Half-extent of the shadow map's world coverage: one map of this radius, centred on the middle of the ...
resource::EnvironmentHandle environment
What this Ambient light IS, when it is more than one colour: a baked panorama's irradiance and reflec...
bool enabled
Disabled lights are skipped during collection.
resource::TextureHandle cookie
A texture whose ALPHA is this light's shape — a lantern's glow, a window's shaft. Drawn at the light'...