Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
ProbeStore.hpp File Reference

Which baked grid a point stands in, and what it says there. More...

#include "../../core/Half.hpp"
#include "../../core/Revision.hpp"
#include "../../core/Types.hpp"
#include "../../core/Hash.hpp"
#include "../../resource/ProbeVolume.hpp"
#include "./ProbeConstants.hpp"
#include <algorithm>
#include <cmath>
#include <glm/glm.hpp>
#include <vector>
Include dependency graph for ProbeStore.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  esengine::ProbeStore
 The frame's probe volumes, and the trilinear read through them. More...
struct  esengine::ProbeStore::Volume
 One volume: a world box, and the grid solved inside it. More...

Namespaces

namespace  esengine

Detailed Description

Which baked grid a point stands in, and what it says there.

The frame's LightProbeVolume components, as bounds plus the grid each one reads. Filled during collection and read during collection — a volume is borrowed, not copied, so nothing here outlives the frame that gathered it.

Two ways a draw reads one. Per object: the nine coefficients where the draw stands, read here on the CPU — one value for the whole mesh. Per pixel: the grid itself, packed into the frame's probe atlas, and the draw's run says where in it — so one merged mesh spanning a shed and the yard outside is dark under the roof and lit in the open.

The atlas is a 3D texture of BRICKS, the shape a sparse volumetric lightmap takes: a grid is cut into blocks of kBrickCells cells a side, each stored kBrickTexels texels a side so that a brick carries the probes on its far faces too and the hardware's trilinear filter never reaches past it. An indirection cell per brick says where its brick sits. A dense grid is every brick at one size; a sparse one will point a run of indirection cells at one coarse brick (the span its indirection texel carries).

Definition in file ProbeStore.hpp.