Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

struct Enlighten::UE4::RectLight::CachedData

    └>Enlighten::InputLightBase

Cached data for RectLight.

Variables

NameDescription
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

NameDescription
CachedData(const RectLight &, const void *)

Constructor.

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.


Anchor
a5f2c4610f5bfa30637ea2d2705d80e3e
a5f2c4610f5bfa30637ea2d2705d80e3e

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

...

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

...

Constructor.


Anchor
a630fc4db98716df661f8f202be5bc0a9
a630fc4db98716df661f8f202be5bc0a9

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.


Anchor
a1e800e092db44a3676d766c6b1317085
a1e800e092db44a3676d766c6b1317085

Enlighten::InputLightBase::InputLightBase

...

protected: InputLightBase
(
    eLightType lightType
)

...

Constructor.


Anchor
a8f8299daadfb542d3d6821951b936188
a8f8299daadfb542d3d6821951b936188

Enlighten::InputLightBase::InputLightBase

...

protected: InputLightBase
(
    eLightType lightType,
    bool hasChanged
)

...

Constructor.


Anchor
a8967bdea65e321be235329cf4435235d
a8967bdea65e321be235329cf4435235d

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.


Anchor
a225d5b3b60353d537afeb1cffc35f558
a225d5b3b60353d537afeb1cffc35f558

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.


Anchor
ac9602cb0901adbb6d0fb18841ceab493
ac9602cb0901adbb6d0fb18841ceab493

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.


Anchor
a3da9773e920ce11b771845779bd33875
a3da9773e920ce11b771845779bd33875

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.


Anchor
a5db95849d4296817a7d79a99744b39bb
a5db95849d4296817a7d79a99744b39bb

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.


Anchor
a7ef6f5042f9f13b10c24b6d58cc71e3c
a7ef6f5042f9f13b10c24b6d58cc71e3c

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.


Anchor
a1071dc04782cca554e2bd31dc10d7d92
a1071dc04782cca554e2bd31dc10d7d92

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