This is the documentation for Enlighten.

struct Enlighten UE4 RectLight CachedData

struct Enlighten::UE4::RectLight::CachedData

    └>Enlighten::InputLightBase

Cached data for RectLight.

Variables

Name Description
float BarnDoorCosAngle

Cosine of the angle of the barn doors.

float BarnDoorLength

Length of the barn doors.

Geo::v128 Direction_PlaneDistance

XYZ: World space x axis of light space. W: Distance to plane which passes through Position.

Geo::u32 HasVisibilityData

Has visibility data?

Geo::v128 Intensity

RGB intensity.

bool m_HasChanged

Whether the light has changed since it was last given to the extended direct lighting api.

const eLightType m_LightType

Type of input light corresponding to an eLightType enum value.

Geo::u64 m_Padding

Unused (this class is usually extended by one that starts with multiple v128s)

Geo::v128 Position

World space position of the light.

Geo::v128 RightDirection_InvRadius

XYZ: World space y axis of light space. W: 1 / attenuation radius.

float SourceLength

Half height of the rectangle.

float SourceRadius

Half width of the rectangle.

Geo::v128 UpDirection_SqrRadius

XYZ: World space y axis of light space. W: squared attenuation radius.

const Geo::u8 * VisibilityData

Visibility data.

Geo::u64 VisibilityData64

Visibility data.

Functions

Name Description
CachedData(const RectLight &, const void *)

Constructor.

DistanceFilter(float)

Return true if this light affects a system at the specified distance from the viewer.

Hash(Helpers::Hasher &, Geo::u32, Geo::u32)

Hash all members of the light data.

InputLightBase(eLightType)

Constructor.

InputLightBase(eLightType, bool)

Constructor.

IsIntersectingBox(const Geo::v128 &, const Geo::v128 &)

Test if the light intersects the specified bounding box.

IsIntersectingCluster(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Test if the lights intersects a single cluster. Additional normal vectors enable culling against direction.

IsIntersectingClusterGroup(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Test if the lights intersects a group of clusters bounding box. Additional normal vectors enable culling against direction.

IsIntersectingSystem(const Geo::v128 &, const Geo::v128 &)

Test if the light intersects the systems bounding box.

ShadeFourSamples(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, Geo::u32, Geo::v128 &, Geo::v128 &, Geo::v128 &, Geo::v128 &)

Shade the four samples and return the individual colours.

ShadeQuad(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, Geo::u32, Geo::u32)

Shade the four samples and return the average as a single colour.

ShadeQuadIntensities(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Function to shade four point with 4 normals.


Enlighten::UE4::RectLight::CachedData::CachedData


public: CachedData
(
    const RectLight & rectLight,
    const void * perDusterVisibility
)


Constructor.


GEO_CONTROLLED_INLINE bool Enlighten::InputLightBase::DistanceFilter


public: GEO_CONTROLLED_INLINE bool DistanceFilter
(
    float viewDistance
) const


Return true if this light affects a system at the specified distance from the viewer.


void Enlighten::UE4::RectLight::CachedData::Hash


public: void Hash
(
    Helpers::Hasher & hash,
    Geo::u32 clusterVisSize,
    Geo::u32 quadVisSize
)


Hash all members of the light data.


Enlighten::InputLightBase::InputLightBase


protected: InputLightBase
(
    eLightType lightType
)


Constructor.


Enlighten::InputLightBase::InputLightBase


protected: InputLightBase
(
    eLightType lightType,
    bool hasChanged
)


Constructor.


GEO_CONTROLLED_INLINE bool Enlighten::UE4::RectLight::CachedData::IsIntersectingBox


public: GEO_CONTROLLED_INLINE bool IsIntersectingBox
(
    const Geo::v128 & bbMin,
    const Geo::v128 & bbMax
) const


Test if the light intersects the specified bounding box.


GEO_CONTROLLED_INLINE bool Enlighten::UE4::RectLight::CachedData::IsIntersectingCluster


public: GEO_CONTROLLED_INLINE bool IsIntersectingCluster
(
    const Geo::v128 & bbMin,
    const Geo::v128 & bbMax,
    const Geo::v128 & minNormalFlipped,
    const Geo::v128 & maxNormalFlipped
) const


Test if the lights intersects a single cluster. Additional normal vectors enable culling against direction.


GEO_CONTROLLED_INLINE bool Enlighten::UE4::RectLight::CachedData::IsIntersectingClusterGroup


public: GEO_CONTROLLED_INLINE bool IsIntersectingClusterGroup
(
    const Geo::v128 & bbMin,
    const Geo::v128 & bbMax,
    const Geo::v128 & minNormalFlipped,
    const Geo::v128 & maxNormalFlipped
) const


Test if the lights intersects a group of clusters bounding box. Additional normal vectors enable culling against direction.


GEO_CONTROLLED_INLINE bool Enlighten::UE4::RectLight::CachedData::IsIntersectingSystem


public: GEO_CONTROLLED_INLINE bool IsIntersectingSystem
(
    const Geo::v128 & bbMin,
    const Geo::v128 & bbMax
) const


Test if the light intersects the systems bounding box.


GEO_CONTROLLED_INLINE void Enlighten::UE4::RectLight::CachedData::ShadeFourSamples


public: GEO_CONTROLLED_INLINE void ShadeFourSamples
(
    const Geo::v128 & positionsX,
    const Geo::v128 & positionsY,
    const Geo::v128 & positionsZ,
    const Geo::v128 & normalsX,
    const Geo::v128 & normalsY,
    const Geo::v128 & normalsZ,
    Geo::u32 sampleIdx,
    Geo::v128 & colourOut0,
    Geo::v128 & colourOut1,
    Geo::v128 & colourOut2,
    Geo::v128 & colourOut3
) const


Shade the four samples and return the individual colours.


GEO_CONTROLLED_INLINE Geo::v128 Enlighten::UE4::RectLight::CachedData::ShadeQuad


public: GEO_CONTROLLED_INLINEGeo::v128 ShadeQuad
(
    const Geo::v128 & positionsX,
    const Geo::v128 & positionsY,
    const Geo::v128 & positionsZ,
    const Geo::v128 & normalsX,
    const Geo::v128 & normalsY,
    const Geo::v128 & normalsZ,
    Geo::u32 clusterIdx,
    Geo::u32 quadIdx
) const


Shade the four samples and return the average as a single colour.


GEO_CONTROLLED_INLINE Geo::v128 Enlighten::UE4::RectLight::CachedData::ShadeQuadIntensities


public: GEO_CONTROLLED_INLINEGeo::v128 ShadeQuadIntensities
(
    const Geo::v128 & positionsX,
    const Geo::v128 & positionsY,
    const Geo::v128 & positionsZ,
    const Geo::v128 & normalsX,
    const Geo::v128 & normalsY,
    const Geo::v128 & normalsZ,
    const Geo::v128 & visibility
) const


Function to shade four point with 4 normals.

The quad idx and cluster idx can be used for looking up visibility in the visibility buffer. The return values are the intensities of the four samples in each channel of the v128