This is the documentation for Enlighten.

class Enlighten CpuSystem

class Enlighten::CpuSystem

    └>Enlighten::BaseSystem
        └>Geo::IGeoReleasable

System for the CPU solver.

Functions

Name Description
AllocateAlbedoHandler()

Allocates an albedo handler.

AllocateInputLightingBuffers()

Allocate the InputLightingBuffers for this system.

AllocatePersistentDataBuffers(bool)

Allocate the buffers for persistent data (bounce, temporal coherence)

AllocateProbeBounceWorkspace()

Allocate the probe bounce buffer.

AllocateTransparencyBuffers()

Allocate the transparency buffers.

CpuSystem(PrecisionHint::Value)

Constructor.

DisableUpdatesAndFreeMemory(bool)

Frees all memory required to update the radiosity, and disables further updates.

FreeProbeBounceBuffer()

Free the probe bounce buffer.

FreeTransparencyBuffer()

Free any transparency buffers.

FreezeInputLighting()

Freeze this systems input lighting.

GetCpuSystemSolutionSpace()

Returns the main solution space in this system.

GetCpuSystemSolutionSpace()

Returns the main solution space in this system.

GetCpuSystemSolutionSpace(const Geo::s32)

Returns a solution space in this system.

GetCpuSystemSolutionSpace(const Geo::s32)

Returns a solution space in this system.

GetInputLightingBuffer()

Returns the current input lighting buffer.

GetInputLightingBuffer()

Returns the current input lighting buffer.

GetInputLightingList()

Returns the sorted list of inputlightingbuffers to read from.

GetLightBankBuffer(Geo::s32)

Returns the input lighting buffer corresponding to the light bank id, creating a new buffer if necessary.

GetLightBankBuffers()

Returns the array of input lighting buffers for the light banks.

GetNumLightBankBuffers()

Returns the number of input lighting buffers for the light banks.

GetTextureUpdateTicks()

Get the number of ticks spent updating GPU textures.

GetTransparencyWorkspace()

Returns the Transparency workspace if Transparency is enabled.

GetTransparencyWorkspace()

Returns the Transparency workspace if Transparency is enabled.

HasAlbedoData()

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

HashLightingInputs(const Enlighten::InputLightingBuffer *)

Returns a hash of the guids for all the input InputLightingBuffers and the environment.

HasLightingInputsChanged(Geo::u32)

Returns true if the input hash matches the stored hash.

HasWorkerPropertiesChanged(Geo::u32)

Returns true if the input hash matches the stored hash.

InitStaticSystem(const Geo::GeoGuid &, InputLightingBuffer *, Geo::s32)

Initialise input lighting buffers with static data.

IsBounceProbeSampled()

Returns true if the system samples bounce from probes rather than the solver output.

IsStatic()

Returns true if the system is static.

IsTransparencySampled()

Returns true if the system includes additional (optional) transparency data.

PrepareInputLightingList(const Geo::GeoArray< const InputLightingBuffer * > &, Geo::u32)

Calculate th InputLightingBuffer list.

Release()

Free this object that was created within the Enlighten libraries.

Release()

Free this object that was created within the Enlighten libraries.

RemoveLightBankBuffer(Geo::s32)

Removes a cached light bank and frees its resources.

SetAlbedoData(Enlighten::SystemAlbedoData)

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

SetBounceScale(float)

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

SetCustomDirectionalVisibility(void *, Geo::s32)

Set a custom directional visibility buffer. Will use precomputed directional vis data in srcBuffer is NULL.

SetDirectionalLightInputScale(float)

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

SetDirectionalVisibility(const Geo::v128 &, Geo::s32)

Update the directional visibility.

SetEmissiveEnvironment(Geo::GeoGuid)

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

SetFramesPerUpdate(Geo::s32)

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

SetSystemSolutionSpace(ISystemSolutionSpace *)

Set a single solution space for this system.

SetSystemSolutionSpaces(ISystemSolutionSpace *const *, const Geo::s32, const Geo::s32)

Set multiple solution spaces for this system.

SetTemporalCoherenceThreshold(float)

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

SetTransparencyEnabled(bool)

Set whether or not Transparency should be computed in the HLRT.

SetUpdateCounter(Geo::s32)

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

UpdateFrameCounter()

Property-setting functions which can be enqueued with EnqueueSetObjectParameter.

UpdateGpuTexture()

Update textures using the marked solution buffers.

UpdateInputLightingHash(Geo::u32)

Update the stored hash with the given hash value.

UpdateWorkerPropertiesHash(Geo::u32)

Update the stored hash with the given hash value.

Variables

Name Description
Enlighten::BounceBuffer * m_BounceBuffer

Buffer containing bounce per cluster.

Geo::GeoArray< CpuSystem * > m_Dependencies

Array of system dependencies in the correct order for passing input lighting buffers to the solve task.

Enlighten::BounceBuffer * m_EnvOnlyBounceBuffer

Buffer containing bounce per cluster, but only for the environment.

InputLightingBuffer * m_InputLightingBuffer

Current input lighting buffer.

const InputLightingBuffer ** m_InputLightingList

Ordered list of input lighting buffers this system reads from.

Geo::u32 m_InputLightingListHash

Hash of the input lighting Guids last time the InputLightingList was built.

PrecisionHint::Value m_InputLightingPrecisionHint

Hint for precision used for storing input lighting.

Geo::u32 m_ProbeBounceInterpolationInputChangeId

The value of counter from the worker, as of the last time this system's probe bounce was updated.

Enlighten::ProbeBounceWorkspace * m_ProbeBounceWorkspace

Buffer for storing probe bounce for a system.

Geo::s64 m_TextureUpdateTicks

CPU ticks taken to update the texture.

bool m_TransparencyInterpolantsNeedUpdate

If true, the transparency interpolants will be recalculated.

Geo::u32 m_TransparencyInterpolationInputChangeId

The value of counter from the worker, as of the last time this system's transparency was updated.

bool m_TransparencyVolumeUpdated

If true, the transparency workspace will be updated.

Enlighten::TransparencyWorkspace * m_TransparencyWorkspace

Enlighten intermediate data allocated and owned by the UpdateManager.

Geo::GeoArray< bool > m_UseCustomDirectionalVisibility

Array of boolean values indication if the HLRT should use custom provided visibility or recalculate visibility.


virtual BaseAlbedoHandler* Enlighten::CpuSystem::AllocateAlbedoHandler


public: virtual BaseAlbedoHandler * AllocateAlbedoHandler()


Allocates an albedo handler.


void Enlighten::CpuSystem::AllocateInputLightingBuffers


public: void AllocateInputLightingBuffers()


Allocate the InputLightingBuffers for this system.


virtual void Enlighten::CpuSystem::AllocatePersistentDataBuffers


public: virtual void AllocatePersistentDataBuffers
(
    bool allocateEnvBounceBuffer
)


Allocate the buffers for persistent data (bounce, temporal coherence)


virtual void Enlighten::CpuSystem::AllocateProbeBounceWorkspace


public: virtual void AllocateProbeBounceWorkspace()


Allocate the probe bounce buffer.


virtual void Enlighten::CpuSystem::AllocateTransparencyBuffers


public: virtual void AllocateTransparencyBuffers()


Allocate the transparency buffers.


Enlighten::CpuSystem::CpuSystem


public: CpuSystem
(
    PrecisionHint::Value precision
)


Constructor.


virtual void Enlighten::CpuSystem::DisableUpdatesAndFreeMemory


public: virtual void DisableUpdatesAndFreeMemory
(
    bool keepInputLightResults
)


Frees all memory required to update the radiosity, and disables further updates.

Can also optionally free the input light memory - in which case other systems and probe sets will not receive light from this system during subsequent radiosity updates.


virtual void Enlighten::CpuSystem::FreeProbeBounceBuffer


public: virtual void FreeProbeBounceBuffer()


Free the probe bounce buffer.


virtual void Enlighten::CpuSystem::FreeTransparencyBuffer


public: virtual void FreeTransparencyBuffer()


Free any transparency buffers.


void Enlighten::CpuSystem::FreezeInputLighting


public: void FreezeInputLighting()


Freeze this systems input lighting.


CpuSystemSolutionSpace* Enlighten::CpuSystem::GetCpuSystemSolutionSpace


public: CpuSystemSolutionSpace * GetCpuSystemSolutionSpace()


Returns the main solution space in this system.


const CpuSystemSolutionSpace* Enlighten::CpuSystem::GetCpuSystemSolutionSpace


public: const CpuSystemSolutionSpace * GetCpuSystemSolutionSpace() const


Returns the main solution space in this system.


CpuSystemSolutionSpace* Enlighten::CpuSystem::GetCpuSystemSolutionSpace


public: CpuSystemSolutionSpace * GetCpuSystemSolutionSpace
(
    const Geo::s32 index
)


Returns a solution space in this system.

Parameters
index

The index of the solution space.


const CpuSystemSolutionSpace* Enlighten::CpuSystem::GetCpuSystemSolutionSpace


public: const CpuSystemSolutionSpace * GetCpuSystemSolutionSpace
(
    const Geo::s32 index
) const


Returns a solution space in this system.

Parameters
index

The index of the solution space.


virtual const InputLightingBuffer* Enlighten::CpuSystem::GetInputLightingBuffer


public: virtual const InputLightingBuffer * GetInputLightingBuffer() const


Returns the current input lighting buffer.


virtual InputLightingBuffer* Enlighten::CpuSystem::GetInputLightingBuffer


public: virtual InputLightingBuffer * GetInputLightingBuffer()


Returns the current input lighting buffer.


const InputLightingBuffer** Enlighten::CpuSystem::GetInputLightingList


public: const InputLightingBuffer ** GetInputLightingList() const


Returns the sorted list of inputlightingbuffers to read from.


IncidentLightingBuffer* Enlighten::CpuSystem::GetLightBankBuffer


public: IncidentLightingBuffer * GetLightBankBuffer
(
    Geo::s32 lightBankId
)


Returns the input lighting buffer corresponding to the light bank id, creating a new buffer if necessary.


virtual IncidentLightingBuffer** Enlighten::CpuSystem::GetLightBankBuffers


public: virtual IncidentLightingBuffer ** GetLightBankBuffers()


Returns the array of input lighting buffers for the light banks.


Geo::s32 Enlighten::CpuSystem::GetNumLightBankBuffers


public: Geo::s32 GetNumLightBankBuffers()


Returns the number of input lighting buffers for the light banks.


virtual Geo::s64 Enlighten::CpuSystem::GetTextureUpdateTicks


public: virtual Geo::s64 GetTextureUpdateTicks() const


Get the number of ticks spent updating GPU textures.


const Enlighten::TransparencyWorkspace* Enlighten::CpuSystem::GetTransparencyWorkspace


public: const Enlighten::TransparencyWorkspace * GetTransparencyWorkspace() const


Returns the Transparency workspace if Transparency is enabled.

Otherwise return NULL.


Enlighten::TransparencyWorkspace* Enlighten::CpuSystem::GetTransparencyWorkspace


public: Enlighten::TransparencyWorkspace * GetTransparencyWorkspace()


Returns the Transparency workspace if Transparency is enabled.

Otherwise return NULL.


bool Enlighten::BaseSystem::HasAlbedoData


public: bool HasAlbedoData()


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


Geo::u32 Enlighten::CpuSystem::HashLightingInputs


public: Geo::u32 HashLightingInputs
(
    const Enlighten::InputLightingBuffer * environment
)


Returns a hash of the guids for all the input InputLightingBuffers and the environment.


bool Enlighten::CpuSystem::HasLightingInputsChanged


public: bool HasLightingInputsChanged
(
    Geo::u32 inputLightingHash
) const


Returns true if the input hash matches the stored hash.


bool Enlighten::CpuSystem::HasWorkerPropertiesChanged


public: bool HasWorkerPropertiesChanged
(
    Geo::u32 workerPropertiesHash
) const


Returns true if the input hash matches the stored hash.


virtual void Enlighten::CpuSystem::InitStaticSystem


public: virtual void InitStaticSystem
(
    const Geo::GeoGuid & guid,
    InputLightingBuffer * inputLightingBuffer,
    Geo::s32 lightChannels
)


Initialise input lighting buffers with static data.


bool Enlighten::CpuSystem::IsBounceProbeSampled


public: bool IsBounceProbeSampled() const


Returns true if the system samples bounce from probes rather than the solver output.


virtual bool Enlighten::CpuSystem::IsStatic


public: virtual bool IsStatic()


Returns true if the system is static.


bool Enlighten::CpuSystem::IsTransparencySampled


public: bool IsTransparencySampled() const


Returns true if the system includes additional (optional) transparency data.


void Enlighten::CpuSystem::PrepareInputLightingList


public: void PrepareInputLightingList
(
    const Geo::GeoArray< const InputLightingBuffer * > & list,
    Geo::u32 hash
)


Calculate th InputLightingBuffer list.


virtual void Geo::IGeoReleasable::Release


public: void Release()


Free this object that was created within the Enlighten libraries.

Expect this to behave in a similar way to calling 'delete(this)'


virtual void Enlighten::BaseSystem::Release


protected: virtual void Release()


Free this object that was created within the Enlighten libraries.

Expect this to behave in a similar way to calling 'delete(this)'


virtual void Enlighten::CpuSystem::RemoveLightBankBuffer


public: virtual void RemoveLightBankBuffer
(
    Geo::s32 lightBankId
)


Removes a cached light bank and frees its resources.


virtual void Enlighten::BaseSystem::SetAlbedoData


public: virtual void SetAlbedoData
(
    Enlighten::SystemAlbedoData albedoData
)


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


void Enlighten::BaseSystem::SetBounceScale


public: void SetBounceScale
(
    float s
)


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


void Enlighten::CpuSystem::SetCustomDirectionalVisibility


public: void SetCustomDirectionalVisibility
(
    void * srcBuffer,
    Geo::s32 lightIndex
)


Set a custom directional visibility buffer. Will use precomputed directional vis data in srcBuffer is NULL.


void Enlighten::BaseSystem::SetDirectionalLightInputScale


public: void SetDirectionalLightInputScale
(
    float s
)


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


virtual void Enlighten::CpuSystem::SetDirectionalVisibility


public: virtual void SetDirectionalVisibility
(
    const Geo::v128 & visibility,
    Geo::s32 lightIndex
)


Update the directional visibility.


void Enlighten::BaseSystem::SetEmissiveEnvironment


public: void SetEmissiveEnvironment
(
    Geo::GeoGuid id
)


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


void Enlighten::BaseSystem::SetFramesPerUpdate


public: void SetFramesPerUpdate
(
    Geo::s32 f
)


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


void Enlighten::BaseSystem::SetSystemSolutionSpace


public: void SetSystemSolutionSpace
(
    ISystemSolutionSpace * solutionSpace
)


Set a single solution space for this system.


void Enlighten::BaseSystem::SetSystemSolutionSpaces


public: void SetSystemSolutionSpaces
(
    ISystemSolutionSpace *const * solutionSpaces,
    const Geo::s32 solutionSpacesCount,
    const Geo::s32 indexForBounceResampling
)


Set multiple solution spaces for this system.

The order of the elements in the input array is NOT preserved.

Parameters
solutionSpaces

An array of solution spaces with different output pixel sizes.

solutionSpacesCount

Number of solution spaces in the array.

indexForBounceResampling

The index for the solution space to use for bounce resampling. Should be the index of the solution space with the smallest output pixel size.


void Enlighten::BaseSystem::SetTemporalCoherenceThreshold


public: void SetTemporalCoherenceThreshold
(
    float t
)


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


void Enlighten::BaseSystem::SetTransparencyEnabled


public: void SetTransparencyEnabled
(
    bool enabled
)


Set whether or not Transparency should be computed in the HLRT.


virtual void Enlighten::BaseSystem::SetUpdateCounter


public: virtual void SetUpdateCounter
(
    Geo::s32 c
)


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


void Enlighten::BaseSystem::UpdateFrameCounter


public: void UpdateFrameCounter()


Property-setting functions which can be enqueued with EnqueueSetObjectParameter.


virtual void Enlighten::CpuSystem::UpdateGpuTexture


public: virtual void UpdateGpuTexture()


Update textures using the marked solution buffers.


void Enlighten::CpuSystem::UpdateInputLightingHash


public: void UpdateInputLightingHash
(
    Geo::u32 inputLightingHash
)


Update the stored hash with the given hash value.


void Enlighten::CpuSystem::UpdateWorkerPropertiesHash


public: void UpdateWorkerPropertiesHash
(
    Geo::u32 workerPropertiesHash
)


Update the stored hash with the given hash value.