![]() |
vkmEngine 1.0.15
A C++ game engine · vkmengine.com
|
Baked global illumination: a grid of irradiance probes filling a box. More...
#include <irradiance_volume.h>
Static Public Member Functions | |
| static glm::uvec3 | clampedResolution (const IrradianceVolume &volume) |
| The probe grid size every reader walks; loading does not clamp, so readers clamp here. | |
Public Attributes | |
| glm::vec3 | halfExtents = glm::vec3(10.0f, 5.0f, 10.0f) |
| World units. | |
| float | intensity = 1.0f |
| Linear-HDR multiplier. | |
| float | blendDistance = 1.0f |
| How far inside the box its light fades in, in metres. | |
| uint32_t | bakeVersion = 0 |
| Bump to force a re-bake. | |
Static Public Attributes | |
| static constexpr uint32_t | MAX_RESOLUTION = 64 |
| Most probes one axis may carry. | |
| static constexpr uint32_t | MAX_PROBES = 4096 |
| Most probes the whole grid may carry. | |
Baked global illumination: a grid of irradiance probes filling a box.
Each probe stores the scene captured offline as spherical harmonics; objects in the box sample it trilinearly for indirect diffuse only. The box is centred on the Transform. A scene uses one: findIrradianceVolume picks it.
|
static |
The probe grid size every reader walks; loading does not clamp, so readers clamp here.
| volume | The volume asked about. |
|
staticconstexpr |
Most probes one axis may carry.
The backend's bake runs inside one frame and renders around every probe; MAX_PROBES bounds its cost.
|
staticconstexpr |
Most probes the whole grid may carry.
Each keeps what it sees on the GPU for relighting, at the face size of the backend's bake.
| float Vkm::Engine::IrradianceVolume::blendDistance = 1.0f |
How far inside the box its light fades in, in metres.
Nearer a face, light blends toward the sky's, so the edge is no seam. A distance, not a share, so fades are even on a long flat box. 0 is a hard edge.
| uint32_t Vkm::Engine::IrradianceVolume::bakeVersion = 0 |
Bump to force a re-bake.
For changes the params miss (geometry edited); moving or resizing re-bakes alone, and a change of the lights or the sky relights the bake without one.