![]() |
vkmEngine 1.0.0
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. | |
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.
|
inlinestatic |
The probe grid size every reader walks; loading does not clamp, so readers clamp here.
Also keeps the product of the three inside a uint32.
| volume | The volume asked about. |
|
staticconstexpr |
Most probes one axis may carry.
The bake runs inside one frame and renders around every probe (see GLIrradianceBaker::bake), so the cost is cubic in this.
| 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 (sun moved, geometry edited); moving or resizing re-bakes alone.