Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ecs::LightProbeVolume Struct Reference

A box of baked irradiance: the light for what a bake cannot hold still. More...

#include <Light.hpp>

Public Attributes

resource::ProbeVolumeHandle probes
 The grid this box is read through. Invalid = nothing baked yet, which leaves everything inside lit exactly as it was.
bool capture {false}
 Fill the box at run time from what a camera at its centre sees, all round: the walls as the lights light them now, the sky through the openings — a real-time sky light / reflection capture, and the interior capture a hand-built renderer takes. One grid point for the whole box, read in place of probes.
f32 captureInterval {0.0f}
 Seconds between captures; 0 captures once. Each lit view of the room includes the last capture's fill, so a few captures are a few bounces.
glm::vec3 halfExtents {100.0f, 100.0f, 100.0f}
 Half the box's size, in world units, from the entity's position.
f32 spacing {100.0f}
 World units a bake puts between probes. What the BAKE reads — the grid it produced carries its own resolution, so changing this changes nothing until the next one.
bool enabled {true}
 Disabled volumes are skipped during collection.

Detailed Description

A box of baked irradiance: the light for what a bake cannot hold still.

A draw standing inside takes its indirect light from the eight probes around it rather than from the frame's one environment. The box is AXIS-ALIGNED on the entity's world position; rotation and scale are not read, because a grid solved on world axes cannot be sampled on others.

Definition at line 306 of file Light.hpp.

Member Data Documentation

◆ capture

bool esengine::ecs::LightProbeVolume::capture {false}

Fill the box at run time from what a camera at its centre sees, all round: the walls as the lights light them now, the sky through the openings — a real-time sky light / reflection capture, and the interior capture a hand-built renderer takes. One grid point for the whole box, read in place of probes.

Definition at line 316 of file Light.hpp.

Referenced by lightprobevolumeApplyJS(), and lightprobevolumeToJS().

◆ captureInterval

f32 esengine::ecs::LightProbeVolume::captureInterval {0.0f}

Seconds between captures; 0 captures once. Each lit view of the room includes the last capture's fill, so a few captures are a few bounces.

Definition at line 321 of file Light.hpp.

Referenced by lightprobevolumeApplyJS(), and lightprobevolumeToJS().

◆ enabled

bool esengine::ecs::LightProbeVolume::enabled {true}

Disabled volumes are skipped during collection.

Definition at line 335 of file Light.hpp.

Referenced by lightprobevolumeApplyJS(), and lightprobevolumeToJS().

◆ halfExtents

glm::vec3 esengine::ecs::LightProbeVolume::halfExtents {100.0f, 100.0f, 100.0f}

Half the box's size, in world units, from the entity's position.

Definition at line 325 of file Light.hpp.

Referenced by lightprobevolumeApplyJS(), and lightprobevolumeToJS().

◆ probes

resource::ProbeVolumeHandle esengine::ecs::LightProbeVolume::probes

The grid this box is read through. Invalid = nothing baked yet, which leaves everything inside lit exactly as it was.

Definition at line 310 of file Light.hpp.

Referenced by lightprobevolumeApplyJS(), and lightprobevolumeToJS().

◆ spacing

f32 esengine::ecs::LightProbeVolume::spacing {100.0f}

World units a bake puts between probes. What the BAKE reads — the grid it produced carries its own resolution, so changing this changes nothing until the next one.

Definition at line 331 of file Light.hpp.

Referenced by lightprobevolumeApplyJS(), and lightprobevolumeToJS().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/ecs/components/Light.hpp