This is the documentation for Enlighten.

module High Level Runtime

In addition to the low level API in the Enlighten library itself, the Enlighten SDK now includes a high level run time layer built on top of the low level API.

This part of Enlighten is shipped as source code. As well as being available for integration into a game engine, it serves as example usage of the Enlighten low level API. More details are available in the High Level Runtime section of the SDK documentation.

Classes

Name Description
Enlighten::AsyncTaskThreadGroup

A thread group which executes Enlighten tasks by calling the AsyncTaskCallback a given number of times, and uses GeoEvent signalling to wait until all threads have completed execution.

Enlighten::BakedProbeOutputInfo

Parameters to be enqueued for a SetBakedProbeOutput() command The pointer contents will be copied; when the command has executed the original data may be released.

Enlighten::BaseAlbedoHandler

Base Albedo Handler.

Enlighten::BaseCubeMap

Base class used by the update manager to hold all of the resources for a cube map (regardless of where the solving happens).

Enlighten::BaseDynamicObject

Base class which holds everything a dynamic object must have (regardless of where the solving happens).

Enlighten::BaseEnvironment

Trivial base class used to lend a base type to environment maps.

Enlighten::BaseProbeSet

Class used by the update manager to hold all of the resources for a probe set together.

Enlighten::BaseSystem

Base class which holds everything a system must have (regardless of where the solving happens).

Enlighten::BaseSystemSolutionSpace

Base implementation of ISystemSolutionSpace.

Enlighten::BaseWorker

Base implementation of the worker class, containing functionality common to all platforms.

Enlighten::Command

Basic interface for commands to be executed on the worker thread.

Enlighten::CopyAlbedoBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyBounceBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyEmissiveBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyEmissiveEnvironmentInfo

Parameters to be enqueued for the CopyEmissiveEnvironment() command.

Enlighten::CopyInputLightingBufferInfo

Parameters to be enqueued for a CopyInputLightingBuffer() command.

Enlighten::CopyProbeOutputInfo

Parameters to be enqueued for a CopyProbeOutputInfo() command.

Enlighten::CopyRawOutputInfo

Parameters to be enqueued for a CopyRawOutput() command.

Enlighten::CopyTransparencyBufferInfo

Parameters to be enqueued for a CopyMaterialTransparencyBuffer() or CopyGeometryTransparencyBuffer() command.

Enlighten::CopyVisibilityBufferInfo

Parameters to be enqueued for a CopyVisibilityBuffer() command.

Enlighten::CpuAlbedoHandler

Implementation of BaseAlbedoHandler for the CPU solver.

Enlighten::CpuCubeMap

Derived class of BaseCubeMap used by the CPU and console update managers.

Enlighten::CpuDynamicObject

Implementation of BaseDynamicObject for Cpu Solving.

Enlighten::CpuEnvironment

Class used by the CPU and console update managers to represent an environment map.

Enlighten::CpuSystem

System for the CPU solver.

Enlighten::CpuSystemSolutionSpace

System solution space for the CPU solver.

Enlighten::CpuWorker

Implementation of the worker class, containing functionality common to all platforms which solve radiosity on a CPU or SPU.

Enlighten::DefaultThreadGroup

Default implementation of IThreadGroup which executes tasks serially on the calling thread (the worker thread).

Enlighten::Dx11TextureUpdater

Implementation for managing solver output and Dx11 GPU textures.

Enlighten::Dx9TextureUpdater

Implementation for managing solver output and Dx9 GPU textures.

Enlighten::DynamicObject

Class representing the local bounding box and corresponding output probe resolution of a dynamic object, so that it can be lit with volume textures of SH probe data.

Enlighten::EnlightenProfile

A container for Enlighten runtime profile statistics.

Enlighten::EnlightenTask

A task to be executed by a TaskProcessor. It consists of a task type and an object pointer.

Enlighten::FixedTimeLimiter

Simple implementation of ILimiter which prevents new tasks from starting after a fixed time has elapsed from the start of UpdateRadiosity().

Enlighten::GlTextureUpdater

Implementation for managing solver output and OpenGL GPU textures.

Enlighten::GpuTextureWrapper

Concrete implementation of IGpuTexture.

Enlighten::IAsyncTask

Async task interface.

Enlighten::IGpuTexture

IGpuTexture is the main interface used by the HLRT to keep track of output textures.

Enlighten::IGpuTextureAllocator

Interface which enables Enlighten to allocate GPU textures to hold the solved output.

Enlighten::IGpuTextureUpdater

IGpuTextureUpdater is the interface used by the HLRT to manage Enlighten solver output and associated GPU texture resources.

Enlighten::ILimiter

Interface which can prevent Enlighten tasks from starting in the current call to UpdateRadiosity.

Enlighten::ISystemSolutionSpace

A solution space for a system.

Enlighten::IThreadGroup

Interface through which MultithreadCpuWorker runs tasks on multiple threads in parallel.

Enlighten::IUpdateManager

This class is the base interface for the singleton object which manages all of the Enlighten updates for the systems and lights in the world, according to the current update strategy, solve type and albedo type.

Enlighten::IUpdateManagerWorker

Interface of the update manager worker.

Enlighten::LightMethodSelector

Light Method Selector.

Enlighten::MultithreadCpuUpdateManager

An update manager for Enlighten that does CPU updates.

Enlighten::MultithreadCpuWorker

Worker for the mulithreaded CPU update manager.

Enlighten::MultithreadCpuWorkerCommon

Implementation of the worker class, containing functionality for platforms which run tasks on a multithreaded CPU.

Enlighten::ProfileHistory

A simple class for recording a history of double valued stats.

Enlighten::RawBuffer

A range of bytes.

Enlighten::ReadInputLightingBufferInfo

Parameters to be enqueued for a ReadInputLightingBufferInfo() command.

Enlighten::RefTextureAllocator

Texture allocator for creating CPU solution spaces for Enlighten without any associated GPU resources.

Enlighten::RefTextureUpdater

Reference texture updater.

Enlighten::ReleaseSystemSolutionSpacesInfo

Parameters to be enqueued for a ReleaseSystemSolutionSpaces() command.

Enlighten::RemoveInfo

Parameters to be enqueued for a RemoveSystem(), RemoveProbeSet(), RemoveCubeMap() or RemoveDynamicObject() command.

Enlighten::SetLightBankUpdateCounterInfo

Parameters to be enqueued for a SetLightBankUpdateCounter() command.

Enlighten::SetParameterCommand

Command to set a parameter on an object.

Enlighten::SetProbeSetTransformInfo

Parameters to be enqueued for a SetProbeSetTransform() command.

Enlighten::SetSystemSolutionSpacesCommand

Command to set solutions spaces for given system.

Enlighten::SetTransparencySamplePositionOffsetInfo

Parameters to be enqueued for a SetTransparencySamplePositionOffset() command.

Enlighten::SetVisibilityBitsInfo

Parameters to be enqueued for a SetVisibilityBits() command.

Enlighten::SystemAlbedoData

Class representing the albedo data for a system (or dynamic object which contributes to radiosity).

Enlighten::TaskProcessor

TaskProcessor runs a loop for pulling tasks off the current queue until either the whole list is done, or an ILimiter tells it to stop.

Enlighten::TextureSubSection

Defines a sub-section of a texture, specified in texels.

Enlighten::TriggerVolumeTransparencyGeneric

Command to trigger a transprency volume.

Enlighten::UpdateEnvironmentInfo

Parameters to be enqueued for the UpdateEmissiveEnvironment() command.

Enlighten::UpdateLightCommandGeneric

Command to update a light.

Enlighten::UpdateLightInfo

Parameters to be enqueued for the UpdateLight() command.

Enlighten::UpdateLightOptions

Optional parameters to the UpdateLight() command.

Enlighten::UpdateManagerLight

Class which extends the Enlighten input light class with extra data used only by the high level runtime, and not by Enlighten itself.

Enlighten::UpdateManagerProperties

This class contains the properties of an Update Manager which must be supplied on creation and can't be changed.

Enlighten::UpdateManagerWorkerProperties

Class representing the global state of the update manager worker.

Enlighten::WorkerFunctionCommand

Command to execute a function in the IUpdaetManagerWorker interface with no input arguments.

Enlighten::WorkerFunctionParameterCommand

Command to execute a function in the IUpdateManagerWorker interface with one input argument.

Enlighten::WorkerFunctionTwoParametersCommand

Command to execute a function in the IUpdateManagerWorker interface with two parameters.

Enlighten::WorkerObjectFunctionCommand

Command to execute paramless method on an an object specified by the guid.

Enlighten::WorkerThreadData

Helper class for holding per-thread working data.

Enlighten::WorkspaceAllocator

A specialised circular/stack allocator hybrid for allocating solve workspace memory.

Functions

Name Description
AddItem(Geo::s32, double)

Add a profile item to the history.

Clear()

Remove all objects from the update manager and free all associated memory.

ConvertToDx9Format(TextureFormat)

Helper function to convert from platform independent Enlighten::TextureFormat to Dx9 texture format.

ConvertToDxgiFormat(TextureFormat)

Helper function to convert from platform independent Enlighten::TextureFormat to DXGI texture format.

Copy(InputLightBase *, const UpdateManagerLight *)

Copies a light.

Copy(UpdateManagerLight *, const InputLightBase *)

Copies a light.

Create(const UpdateManagerProperties &)

Create a multithread CPU update manager.

CyclesToMillisecond(Geo::s64)

Helper function to convert CPU cycles to milliseconds.

CyclesToSeconds(Geo::s64)

Helper function to convert CPU cycles to seconds.

EnqueueCommand(IUpdateManager *, CommandType &&)

Enqueues a command.

EnqueueCommand(CommandType &&)

Enqueues a command for later execution by the worker thread, if it is running.

EnqueueSetObjectParameter(IUpdateManager *, Geo::GeoGuid, void(ObjectType::*)(ParamType), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

EnqueueSetObjectParameter(IUpdateManager *, ObjectType *, void(ObjectType::*)(const ParamType &), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

EnqueueSetObjectParameter(IUpdateManager *, Geo::GeoGuid, void(ObjectType::*)(const ParamType &), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

EnqueueSetObjectParameter(IUpdateManager *, ObjectType *, void(ObjectType::*)(ParamType), ArgType &&)

Enqueues a command to set a parameter on an object on the worker thread.

FindObject(const Geo::GeoGuid &, BaseSystem *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseProbeSet *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseCubeMap *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseDynamicObject *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, CpuSystem *&)

Specialise the BaseWorker::FindObject to deal with a concrete type here.

GetDxgiFormatBytesPerPixel(DXGI_FORMAT)

Helper function to calculate the number of texture bytes per pixel for DXGI texture formats supported by Enlighten.

GetItem(Geo::s32)

Get the last added profile item.

GetItemAverage(Geo::s32)

Get the average of the profile items in the history.

GetItemCount(Geo::s32)

Get the number of profile items in the history.

GetItemMaximum(Geo::s32)

Get the max value of the profile items in the history.

GetItemMinimum(Geo::s32)

Get the min value of the profile items in the history.

GetOutputTextureRangeEnd(const RadSystemCore &, SolveType)

Return the end of the range of output texture types that can be updated for this combination of solve type and radiosity core.

GetTextureBytesPerPixel(TextureFormat)

Gets the number of bytes required for each pixel of the given texture format.

MultithreadCpuUpdateManager(const UpdateManagerProperties &)

Protected constructor. Do not call directly, use Create instead.

ProfileHistory(const Geo::GeoGuid &)

Construct a history from a guid.

Reset()

Reset to empty (clear all history)

SetWorkerProperties(const UpdateManagerWorkerProperties &)

Set the worker global state.

UpdateRadiosity(const Geo::v128 &)

The main radiosity update function.

Enums

Name Description
AggregateProfileItem

Items we record for totals.

CubeMapProfileItem

Items we record against cube maps.

EnlightenTaskType

The MultithreadCpuWorker works by putting tasks in a list, and then executing TaskProcessors on several threads in parallel.

OutputTextureType

Enumeration of the different output textures produced by the Enlighten solvers.

ProbeSetProfileItem

Items we record against probe sets.

ProbeVolumeOutputTextureType

Enumeration of the different probe volume output textures.

SolveType

Enumeration of the different types of solve.

SystemProfileItem

Items we record against systems.

TextureFormat

Enumeration of output texture formats used by the high level run-time.

Typedefs

Name Description
void(GEO_CALL * AsyncTaskCallback)(IAsyncTask *Task, const char *Name)

Function pointer type for the callback for executing tasks asynchronously.

void(* CommandCompletedCallback)(void *)

Callback signature for when a command is completed.

ProfileHistory< NUM_AGGREGATE_PROFILE_ITEMS > EnlightenAggregateProfile

History profile for aggregate stats.

ProfileHistory< NUM_CUBE_MAP_PROFILE_ITEMS > EnlightenCubeMapProfile

History profile for cube maps.

ProfileHistory< NUM_PROBE_SET_PROFILE_ITEMS > EnlightenProbeSetProfile

History profile for probesets.

ProfileHistory< NUM_SYSTEM_PROFILE_ITEMS > EnlightenSystemProfile

History profile for systems.

Geo::GeoString< char > ProfileDescription

String for describing a profile, used by EnlightenProfile.

Geo::GeoMap< Geo::GeoGuid, Geo::s32 > TGuidIndexMap

GeoGuid-to-s32 map used by EnlightenProfile.

Variables

Name Description
const Geo::u64 DEFAULT_WORKER_THREAD_AFFINITY = Geo::g_MaxU64

Constant defining the default affinity for the worker thread of a MultithreadCpuWorker.

const Geo::s32 INFINITE_UPDATES = -1

Set the update counter for a system to this value to request continuous updates.


void Enlighten::ProfileHistory< tNumProfileItems >::AddItem


public: void AddItem
(
    Geo::s32 item,
    double value
)


Add a profile item to the history.


virtual void Enlighten::MultithreadCpuUpdateManager::Clear


public: virtual void Clear()


Remove all objects from the update manager and free all associated memory.


D3DFORMAT Enlighten::ConvertToDx9Format


public: D3DFORMAT ConvertToDx9Format
(
    TextureFormat format
)


Helper function to convert from platform independent Enlighten::TextureFormat to Dx9 texture format.


DXGI_FORMAT Enlighten::ConvertToDxgiFormat


public: DXGI_FORMAT ConvertToDxgiFormat
(
    TextureFormat format
)


Helper function to convert from platform independent Enlighten::TextureFormat to DXGI texture format.


void Enlighten::LightMethodSelector::Copy


public: void Copy
(
    InputLightBase * lightDst,
    const UpdateManagerLight * lightSrc
) const


Copies a light.


void Enlighten::LightMethodSelector::Copy


public: void Copy
(
    UpdateManagerLight * lightDst,
    const InputLightBase * lightSrc
) const


Copies a light.


static IUpdateManager* Enlighten::MultithreadCpuUpdateManager::Create


public: IUpdateManager * Create
(
    const UpdateManagerProperties & properties
)


Create a multithread CPU update manager.

Note: Call GeoAttachLogger to listen for important error and warning messages. Returns null if no logger was attached!


double Enlighten::CyclesToMillisecond


public: double CyclesToMillisecond
(
    Geo::s64 cycles
)


Helper function to convert CPU cycles to milliseconds.


double Enlighten::CyclesToSeconds


public: double CyclesToSeconds
(
    Geo::s64 cycles
)


Helper function to convert CPU cycles to seconds.


void Enlighten::EnqueueCommand


public: void EnqueueCommand
(
    IUpdateManager * updateManager,
    CommandType && command
)


Enqueues a command.

The command will be executed on the worker thread if one exists, otherwise it will be executed immediately on the calling thread. CommandType is expected to be derived from the Command class - see Command.h


void Enlighten::BaseWorker::EnqueueCommand


public: void EnqueueCommand
(
    CommandType && newCommand
)


Enqueues a command for later execution by the worker thread, if it is running.

If the worker thread isn't running, the command is executed immediately on the calling thread.


void Enlighten::EnqueueSetObjectParameter


public: void EnqueueSetObjectParameter
(
    IUpdateManager * updateManager,
    Geo::GeoGuid objectId,
    void(ObjectType::*)(ParamType) function,
    ArgType && value
)


Enqueues a command to set a parameter on an object on the worker thread.

ObjectType may be BaseSystem, BaseDynamicObject, BaseCubeMap or Probes.


void Enlighten::EnqueueSetObjectParameter


public: void EnqueueSetObjectParameter
(
    IUpdateManager * updateManager,
    ObjectType * object,
    void(ObjectType::*)(const ParamType &) function,
    ArgType && value
)


Enqueues a command to set a parameter on an object on the worker thread.

ObjectType may be BaseSystem, BaseDynamicObject, BaseCubeMap or Probes.


void Enlighten::EnqueueSetObjectParameter


public: void EnqueueSetObjectParameter
(
    IUpdateManager * updateManager,
    Geo::GeoGuid objectId,
    void(ObjectType::*)(const ParamType &) function,
    ArgType && value
)


Enqueues a command to set a parameter on an object on the worker thread.

ObjectType may be BaseSystem, BaseDynamicObject, BaseCubeMap or Probes.


void Enlighten::EnqueueSetObjectParameter


public: void EnqueueSetObjectParameter
(
    IUpdateManager * updateManager,
    ObjectType * object,
    void(ObjectType::*)(ParamType) function,
    ArgType && value
)


Enqueues a command to set a parameter on an object on the worker thread.

ObjectType may be BaseSystem, BaseDynamicObject, BaseCubeMap or Probes.


bool Enlighten::BaseWorker::FindObject


public: bool FindObject
(
    const Geo::GeoGuid & id,
    BaseSystem *& systemPtr
)


Finds the object with the given GUID.


bool Enlighten::BaseWorker::FindObject


public: bool FindObject
(
    const Geo::GeoGuid & id,
    BaseProbeSet *& probeSetPtr
)


Finds the object with the given GUID.


bool Enlighten::BaseWorker::FindObject


public: bool FindObject
(
    const Geo::GeoGuid & id,
    BaseCubeMap *& cubeMapPtr
)


Finds the object with the given GUID.


bool Enlighten::BaseWorker::FindObject


public: bool FindObject
(
    const Geo::GeoGuid & id,
    BaseDynamicObject *& dynamicObjectPtr
)


Finds the object with the given GUID.


bool Enlighten::BaseWorker::FindObject


public: bool FindObject
(
    const Geo::GeoGuid & id,
    CpuSystem *& systemObjectPtr
)


Specialise the BaseWorker::FindObject to deal with a concrete type here.


Geo::s32 Enlighten::GetDxgiFormatBytesPerPixel


public: Geo::s32 GetDxgiFormatBytesPerPixel
(
    DXGI_FORMAT format
)


Helper function to calculate the number of texture bytes per pixel for DXGI texture formats supported by Enlighten.


double Enlighten::ProfileHistory< tNumProfileItems >::GetItem


public: double GetItem
(
    Geo::s32 item
) const


Get the last added profile item.


double Enlighten::ProfileHistory< tNumProfileItems >::GetItemAverage


public: double GetItemAverage
(
    Geo::s32 item
) const


Get the average of the profile items in the history.


Geo::u64 Enlighten::ProfileHistory< tNumProfileItems >::GetItemCount


public: Geo::u64 GetItemCount
(
    Geo::s32 item
) const


Get the number of profile items in the history.


double Enlighten::ProfileHistory< tNumProfileItems >::GetItemMaximum


public: double GetItemMaximum
(
    Geo::s32 item
) const


Get the max value of the profile items in the history.


double Enlighten::ProfileHistory< tNumProfileItems >::GetItemMinimum


public: double GetItemMinimum
(
    Geo::s32 item
) const


Get the min value of the profile items in the history.


OutputTextureType Enlighten::GetOutputTextureRangeEnd


public: OutputTextureType GetOutputTextureRangeEnd
(
    const RadSystemCore & core,
    SolveType solveType
)


Return the end of the range of output texture types that can be updated for this combination of solve type and radiosity core.


Geo::s32 Enlighten::GetTextureBytesPerPixel


public: Geo::s32 GetTextureBytesPerPixel
(
    TextureFormat format
)


Gets the number of bytes required for each pixel of the given texture format.


Enlighten::MultithreadCpuUpdateManager::MultithreadCpuUpdateManager


protected: MultithreadCpuUpdateManager
(
    const UpdateManagerProperties & properties
)


Protected constructor. Do not call directly, use Create instead.


Enlighten::ProfileHistory< tNumProfileItems >::ProfileHistory


public: ProfileHistory
(
    const Geo::GeoGuid & systemGuid
)


Construct a history from a guid.


void Enlighten::ProfileHistory< tNumProfileItems >::Reset


public: void Reset()


Reset to empty (clear all history)


void Enlighten::BaseWorker::SetWorkerProperties


public: virtual void SetWorkerProperties
(
    const UpdateManagerWorkerProperties & properties
)


Set the worker global state.


GEO_POP_IGNORE_DEPRECATION_WARNING void Enlighten::BaseWorker::UpdateRadiosity


public: virtual void UpdateRadiosity
(
    const Geo::v128 & viewOrigin
)


The main radiosity update function.


AggregateProfileItem


public: enum AggregateProfileItem
{
    API_ENLIGHTEN_TOTAL_CPU = 0,
    API_ENLIGHTEN_TOTAL_GPU,
    API_ENLIGHTEN_TOTAL_PROBES,
    API_ENLIGHTEN_TOTAL_PROBE_INTERPOLATION,
    API_ENLIGHTEN_TOTAL_CUBEMAPS,
    API_ENLIGHTEN_SETUP_WALLCLOCK,
    API_ENLIGHTEN_ENVIRONMENT_WALLCLOCK,
    API_ENLIGHTEN_INPUTLIGHTING_WALLCLOCK,
    API_ENLIGHTEN_SYSTEMS_WALLCLOCK,
    API_ENLIGHTEN_PROBES_WALLCLOCK,
    API_ENLIGHTEN_CUBEMAPS_WALLCLOCK,
    API_ENLIGHTEN_SOLVE_TASKS_WALLCLOCK,
    API_ENLIGHTEN_DYNAMICOBJECTS_WALLCLOCK,
    API_ENLIGHTEN_TIME_BETWEEN_UPDATES,
    API_ENLIGHTEN_OTHER_COMMANDS,
    API_ENLIGHTEN_INPUTLIGHTING_GPU_TICKS,
    API_ENLIGHTEN_NUM_BLOCKED_BUFFER_WRITES,
    API_ENLIGHTEN_BLOCKED_COMMAND_WRITES_DURATION,
    API_ENLIGHTEN_PPPI_UPDATE_TIME_US,
    API_ENLIGHTEN_PPPI_PROBESET_UPDATE_COUNT,
    API_ENLIGHTEN_PPPI_COPIED_PROBE_COUNT,
    API_ENLIGHTEN_PPPI_COPY_TIME_US,
    API_ENLIGHTEN_PPPI_BUILD_TIME_US,
    API_ENLIGHTEN_PPPI_INDIRECTION_UPDATE_TIME_US,
    API_ENLIGHTEN_PPPI_ATLAS_TILE_COUNT,
    NUM_AGGREGATE_PROFILE_ITEMS
}


Items we record for totals.

enumerators
API_ENLIGHTEN_TOTAL_CPU
API_ENLIGHTEN_TOTAL_GPU
API_ENLIGHTEN_TOTAL_PROBES
API_ENLIGHTEN_TOTAL_PROBE_INTERPOLATION
API_ENLIGHTEN_TOTAL_CUBEMAPS
API_ENLIGHTEN_SETUP_WALLCLOCK
API_ENLIGHTEN_ENVIRONMENT_WALLCLOCK
API_ENLIGHTEN_INPUTLIGHTING_WALLCLOCK
API_ENLIGHTEN_SYSTEMS_WALLCLOCK
API_ENLIGHTEN_PROBES_WALLCLOCK
API_ENLIGHTEN_CUBEMAPS_WALLCLOCK
API_ENLIGHTEN_SOLVE_TASKS_WALLCLOCK
API_ENLIGHTEN_DYNAMICOBJECTS_WALLCLOCK
API_ENLIGHTEN_TIME_BETWEEN_UPDATES
API_ENLIGHTEN_OTHER_COMMANDS
API_ENLIGHTEN_INPUTLIGHTING_GPU_TICKS
API_ENLIGHTEN_NUM_BLOCKED_BUFFER_WRITES
API_ENLIGHTEN_BLOCKED_COMMAND_WRITES_DURATION
API_ENLIGHTEN_PPPI_UPDATE_TIME_US
API_ENLIGHTEN_PPPI_PROBESET_UPDATE_COUNT
API_ENLIGHTEN_PPPI_COPIED_PROBE_COUNT
API_ENLIGHTEN_PPPI_COPY_TIME_US
API_ENLIGHTEN_PPPI_BUILD_TIME_US
API_ENLIGHTEN_PPPI_INDIRECTION_UPDATE_TIME_US
API_ENLIGHTEN_PPPI_ATLAS_TILE_COUNT
NUM_AGGREGATE_PROFILE_ITEMS


CubeMapProfileItem


public: enum CubeMapProfileItem
{
    CMPI_SOLVE_TIME = 0,
    CMPI_SETUP_TIME,
    NUM_CUBE_MAP_PROFILE_ITEMS
}


Items we record against cube maps.

enumerators
CMPI_SOLVE_TIME
CMPI_SETUP_TIME
NUM_CUBE_MAP_PROFILE_ITEMS


EnlightenTaskType


public: enum EnlightenTaskType
{
    ETT_SYSTEM_INPUT_LIGHTING,
    ETT_SYSTEM_SOLVE,
    ETT_PROBE_SOLVE,
    ETT_CUBE_MAP_SOLVE,
    ETT_DYNAMIC_OBJECT_INTERPOLATION
}


The MultithreadCpuWorker works by putting tasks in a list, and then executing TaskProcessors on several threads in parallel.

A TaskProcessor pulls tasks off the list one by one, until either the whole list is done, or an ILimiter tells it to stop.

The executing threads are accessed through the IThreadGroup interface. If none is supplied then the MultithreadCpuWorker will create a DefaultThreadGroup which executes tasks in serial on the calling thread (ie the update manager worker thread). When it is destroyed, the MultithreadCpuWorker will call Release() on the IThreadGroup interface it was passed. There is an implementation of IThreadGroup which uses Intel Threaded Building Blocks in the TbbThreadGroup.h header (which does not get compiled in to EnlightenHRLT).

ILimiter is an optional interface which can be implemented by the application. A simple FixedTimeLimiter is included here which times out after a given fixed time. Note that the limiter only controls the point at which new tasks can be started, not the total time taken.

The Enlighten update loop consists of three multithreaded phases: input lighting, solve tasks, and probe interpolation. Within each phase tasks can run in parallel (for instance, a probe set can be solved at the same time as a system), but tasks from different phases cannot run together.

If no limiter is supplied, the MultithreadCpuWorker will complete one full pass through the update loop for each call to UpdateRadiosity(). However, it can remembers where in the udpate loop it previously stopped, so if a limiter tells it to stop part-way through an update it will resume from where it left off. This ensures that the Enlighten data remains in a consistent state at all times. Enumeration of Enlighten task types. These are executed by the TaskProcessors.

enumerators
ETT_SYSTEM_INPUT_LIGHTING
ETT_SYSTEM_SOLVE
ETT_PROBE_SOLVE
ETT_CUBE_MAP_SOLVE
ETT_DYNAMIC_OBJECT_INTERPOLATION


OutputTextureType


public: enum OutputTextureType
{
    ENLIGHTEN_OUTPUT_IRRADIANCE = 0,
    ENLIGHTEN_OUTPUT_DIRECTIONAL = 1,
    ENLIGHTEN_OUTPUT_DIRECTIONAL_G = 2,
    ENLIGHTEN_OUTPUT_DIRECTIONAL_B = 3,
    ENLIGHTEN_NUM_OUTPUT_TEXTURE_TYPES = 4
}


Enumeration of the different output textures produced by the Enlighten solvers.

enumerators
ENLIGHTEN_OUTPUT_IRRADIANCE

The Irradiance Output data.

ENLIGHTEN_OUTPUT_DIRECTIONAL

The luminance/red Directional Irradiance Output data.

ENLIGHTEN_OUTPUT_DIRECTIONAL_G

The green Directional Irradiance Output data.

ENLIGHTEN_OUTPUT_DIRECTIONAL_B

The blue Directional Irradiance Output data.

ENLIGHTEN_NUM_OUTPUT_TEXTURE_TYPES

Total number of output textures per system.


ProbeSetProfileItem


public: enum ProbeSetProfileItem
{
    PSPI_SOLVE_TIME = 0,
    PSPI_SETUP_TIME,
    PSPI_FREEZE_TIME,
    PSPI_NUM_TOTAL_PROBES,
    PSPI_NUM_REAL_PROBES,
    PSPI_NUM_VIRTUAL_PROBES,
    PSPI_NUM_SOLVED_PROBES,
    NUM_PROBE_SET_PROFILE_ITEMS
}


Items we record against probe sets.

enumerators
PSPI_SOLVE_TIME
PSPI_SETUP_TIME
PSPI_FREEZE_TIME
PSPI_NUM_TOTAL_PROBES
PSPI_NUM_REAL_PROBES
PSPI_NUM_VIRTUAL_PROBES
PSPI_NUM_SOLVED_PROBES
NUM_PROBE_SET_PROFILE_ITEMS


ProbeVolumeOutputTextureType


public: enum ProbeVolumeOutputTextureType
{
    ENLIGHTEN_PROBE_VOLUME_R = 0,
    ENLIGHTEN_PROBE_VOLUME_G = 1,
    ENLIGHTEN_PROBE_VOLUME_B = 2,
    ENLIGHTEN_PROBE_VOLUME_ENV_VIS_SH = 3,
    ENLIGHTEN_PROBE_VOLUME_NUM_TYPES = 4
}


Enumeration of the different probe volume output textures.

enumerators
ENLIGHTEN_PROBE_VOLUME_R

The red channel of probe volume data.

ENLIGHTEN_PROBE_VOLUME_G

The green channel of probe volume data.

ENLIGHTEN_PROBE_VOLUME_B

The blue channel of probe volume data.

ENLIGHTEN_PROBE_VOLUME_ENV_VIS_SH

The environment visibility data.

ENLIGHTEN_PROBE_VOLUME_NUM_TYPES

Total number of probe volume output textures.


SolveType


public: enum SolveType
{
    ENLIGHTEN_IRRADIANCE_ONLY = 0,
    ENLIGHTEN_DIRECTIONAL_IRRADIANCE = 1,
    ENLIGHTEN_DIRECTIONAL_IRRADIANCE_RGB = 2
}


Enumeration of the different types of solve.

enumerators
ENLIGHTEN_IRRADIANCE_ONLY

Computes only the irradiance texture.

ENLIGHTEN_DIRECTIONAL_IRRADIANCE

Computes irradiance and the additional directional texture.

ENLIGHTEN_DIRECTIONAL_IRRADIANCE_RGB

Computes irradiance and three additional directional textures for R, G and B channels.


SystemProfileItem


public: enum SystemProfileItem
{
    SPI_SOLVE_TIME = 0,
    SPI_SOLVE_SETUP_TIME,
    SPI_TRANSPARENCY_TIME,
    SPI_INPUT_LIGHTING_SETUP_TIME,
    SPI_WRITE_INPUT_TIME,
    SPI_DIRECT_INPUT_LIGHTING_TIME = SPI_WRITE_INPUT_TIME,
    SPI_RESAMPLE_LIGHTMAP_BOUNCE,
    SPI_END_INPUT_TIME,
    SPI_INDIRECT_INPUT_LIGHTING_TIME = SPI_END_INPUT_TIME,
    SPI_FREEZE_TIME,
    SPI_SOLVE_PERC,
    SPI_DIRECTIONAL_VISIBILITY_TIME,
    SPI_UPDATE_RATE,
    SPI_NUM_TOTAL_PIXELS,
    SPI_NUM_SOLVED_PIXELS,
    SPI_NUM_LIGHTS_AFFECTING,
    NUM_SYSTEM_PROFILE_ITEMS
}


Items we record against systems.

enumerators
SPI_SOLVE_TIME
SPI_SOLVE_SETUP_TIME
SPI_TRANSPARENCY_TIME
SPI_INPUT_LIGHTING_SETUP_TIME
SPI_WRITE_INPUT_TIME
SPI_DIRECT_INPUT_LIGHTING_TIME
SPI_RESAMPLE_LIGHTMAP_BOUNCE
SPI_END_INPUT_TIME
SPI_INDIRECT_INPUT_LIGHTING_TIME
SPI_FREEZE_TIME
SPI_SOLVE_PERC
SPI_DIRECTIONAL_VISIBILITY_TIME
SPI_UPDATE_RATE
SPI_NUM_TOTAL_PIXELS
SPI_NUM_SOLVED_PIXELS
SPI_NUM_LIGHTS_AFFECTING
NUM_SYSTEM_PROFILE_ITEMS


TextureFormat


public: enum TextureFormat
{
    TextureFormat_A16B16G16R16F,
    TextureFormat_A32B32G32R32F,
    GEO_DEPRECATED_ENUMERATOR =(TextureFormat_A16B16G16R16_Deprecated),
    TextureFormat_A8R8G8B8,
    GEO_DEPRECATED_ENUMERATOR =(TextureFormat_A16B16G16R16_Deprecated),
    GEO_DEPRECATED_ENUMERATOR =(TextureFormat_A16B16G16R16_Deprecated),
    TextureFormat_R8G8B8A8_UINT,
    TextureFormat_R8,
    TextureFormat_R32F,
    GEO_DEPRECATED_ENUMERATOR =(TextureFormat_A16B16G16R16_Deprecated),
    TextureFormat_R11G11B10,
    TextureFormat_R9G9B9E5,
    TextureFormat_UNKNOWN
}


Enumeration of output texture formats used by the high level run-time.

enumerators
TextureFormat_A16B16G16R16F
TextureFormat_A32B32G32R32F
GEO_DEPRECATED_ENUMERATOR
TextureFormat_A8R8G8B8
GEO_DEPRECATED_ENUMERATOR
GEO_DEPRECATED_ENUMERATOR
TextureFormat_R8G8B8A8_UINT
TextureFormat_R8
TextureFormat_R32F
GEO_DEPRECATED_ENUMERATOR
TextureFormat_R11G11B10
TextureFormat_R9G9B9E5
TextureFormat_UNKNOWN