This is the documentation for Enlighten.
class Enlighten PppiManager
class Enlighten::PppiManager
Class that manages the various resources needed for octree probe interpolation.
Notably: The auxiliary data for probe sets that need to be written to the atlas The atlas of probe sets The indirection map referencing the atlas
Functions
Name | Description |
---|---|
AddProbeSet(const Enlighten::RadProbeSetCore *, float *) | Adds a probe set to the PppiManager. |
BeginUpdate() | Must be called before updates to the PppiManager, including adding/removing/updating probe sets and moving the view origin. |
BeginUpdate(const PppiIrradiance &) | Must be called before updates to the PppiManager, including adding/removing/updating probe sets and moving the view origin. |
EndUpdate() | Call this after all updates to the PppiManager are complete at the end of the frame. /. |
GetAtlasNumAllocatedBlocks() | Get the number of blocks currently allocated within the atlas. |
GetAtlasTextureSize() | Gets the edge length of the atlas 3D volume texture. |
GetIndirectionClipmapOrigin() | Gets the world-space quantised origin of the indirection clipmap. |
GetVoxelSize() | Get voxel size. |
HasProbeSet(const Enlighten::RadProbeSetCore *) | Checks whether a probe set is part of the PppiManager. |
Init(const PppiOutputWorkspace &) | Initialises the PppiManager with the given textures. |
RemoveProbeSet(const Enlighten::RadProbeSetCore *) | Removes a probe set from the PppiManager. |
SetViewOrigin(const Geo::v128 &) | Sets the viewer's origin in the world. |
UpdateProbeSet(const Enlighten::RadProbeSetCore *, Geo::s32, bool, UpdatePppiAtlasStats &) | Updates a probe set, writing its values to the Atlas. |
void Enlighten::PppiManager::AddProbeSet
public: void AddProbeSet
(
  const Enlighten::RadProbeSetCore * probeSet,
  float * ProbeOutput
)
Adds a probe set to the PppiManager.
Parameters
[in] | probeSet | The probe set to add |
[in] | ProbeOutput | The output buffer where this probe set's values will be written |
void Enlighten::PppiManager::BeginUpdate
public: void BeginUpdate()
Must be called before updates to the PppiManager, including adding/removing/updating probe sets and moving the view origin.
void Enlighten::PppiManager::BeginUpdate
public: void BeginUpdate
(
  const PppiIrradiance & border
)
Must be called before updates to the PppiManager, including adding/removing/updating probe sets and moving the view origin.
UpdateRegions Enlighten::PppiManager::EndUpdate
public: UpdateRegions EndUpdate()
Call this after all updates to the PppiManager are complete at the end of the frame. /.
Returns
The set of regions within the PPPI output textures that have been updated and therefore need uploading to the GPU.
Geo::s32 Enlighten::PppiManager::GetAtlasNumAllocatedBlocks
public: Geo::s32 GetAtlasNumAllocatedBlocks() const
Get the number of blocks currently allocated within the atlas.
Geo::s32 Enlighten::PppiManager::GetAtlasTextureSize
public: Geo::s32 GetAtlasTextureSize() const
Gets the edge length of the atlas 3D volume texture.
Geo::GeoPoint3D Enlighten::PppiManager::GetIndirectionClipmapOrigin
public: Geo::GeoPoint3D GetIndirectionClipmapOrigin() const
Gets the world-space quantised origin of the indirection clipmap.
float Enlighten::PppiManager::GetVoxelSize
public: float GetVoxelSize() const
Get voxel size.
Returns
The size in world units of each leaf node in the octree
bool Enlighten::PppiManager::HasProbeSet
public: bool HasProbeSet
(
  const Enlighten::RadProbeSetCore * probeSet
) const
Checks whether a probe set is part of the PppiManager.
Parameters
[in] | probeSet | The probe set |
Returns
true if the probe set is part of the PppiManager
UpdateRegions Enlighten::PppiManager::Init
public: UpdateRegions Init
(
  const PppiOutputWorkspace & outputWorkspace
)
Initialises the PppiManager with the given textures.
Parameters
[in] | outputWorkspace | The PPPI output textures that will be updated. |
void Enlighten::PppiManager::RemoveProbeSet
public: void RemoveProbeSet
(
  const Enlighten::RadProbeSetCore * probeSet
)
Removes a probe set from the PppiManager.
Parameters
[in] | probeSet | The probe set to remove |
void Enlighten::PppiManager::SetViewOrigin
public: void SetViewOrigin
(
  const Geo::v128 & ViewOrigin
)
Sets the viewer's origin in the world.
This needs to be called to keep the indirection map valid
Parameters
[in] | ViewOrigin | The origin the indirection map shall be centered around |
void Enlighten::PppiManager::UpdateProbeSet
public: void UpdateProbeSet
(
  const Enlighten::RadProbeSetCore * probeSet,
  Geo::s32 lod,
  bool probeOutputDirty,
  UpdatePppiAtlasStats & outStats
)
Updates a probe set, writing its values to the Atlas.
Parameters
[in] | probeSet | The probe set to update |
[in] | lod | The desired lod level |
[in] | probeOutputDirty | Has the probe set output changed since the last update. |
[out] | outStats | Will be updated to contain useful profiling stats. |