Versions Compared

Key

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

struct Enlighten::Spotlight::CachedData

    └>Enlighten::InputLightBase

Cached data for spotlights.

Variables

NameDescription
Geo::v128 m_BoundsMax

Axis aligned bounding box.

Geo::v128 m_BoundsMin

Axis aligned bounding box.

Geo::v128 m_Colour

RGB intensity of the light (linear space).

Geo::v128 m_CosLightAngle

Cos (light angle)

Geo::v128 m_CutoffSquared

Cutoff * cutoff.

Geo::v128 m_Direction

World space direction of light.

Geo::v128 m_DirectionScale

Direction scale.

Enlighten::InternalLightFalloffTable m_Falloff

Falloff table.

bool m_HasChanged

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

Geo::u32 m_HasVisibilityData

Has visibility data?

const eLightType m_LightType

Type of input light corresponding to an eLightType enum value.

Geo::v128 m_NegativeCosAngleScaledPlusOne

-Cos(scaled light angle) + 1

Geo::v128 m_NegativeSinLightAngle

-Sin(light angle)

Geo::u32 m_Padding

Unused padding.

Geo::u64 m_Padding

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

Geo::v128 m_Position

World space position of light.

Geo::v128 m_Radius

Radius.

Geo::v128 m_SpotlightTable[33]

Spotlight table.

const Geo::u8 * m_VisibilityData

Visibility data.

Geo::u64 m_VisibilityData64

Visibility data.

Functions


Anchor
ada0b8c7c3192cf760b94fb532c82f101
ada0b8c7c3192cf760b94fb532c82f101

Enlighten::Spotlight::CachedData::CachedData

...

public: CachedData
(
    Spotlight & spotlight,
    const void * perDusterVisibility
)

...

Constructor.


Anchor
a8c141f069d3b871bbe1903146fb8808d
a8c141f069d3b871bbe1903146fb8808d

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.


Anchor
acffb357180ecae5e64ef259a02977872
acffb357180ecae5e64ef259a02977872

void Enlighten::Spotlight::CachedData::Hash

...

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

...

Hash 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
afe4603505f65e6a95bd350a6b9221ae3
afe4603505f65e6a95bd350a6b9221ae3

GEO_CONTROLLED_INLINE bool Enlighten::Spotlight::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

...

Complex light V normalBoundingBox intersection test.


Anchor
a44a373195c93167cbb25c8c49328a753
a44a373195c93167cbb25c8c49328a753

GEO_CONTROLLED_INLINE bool Enlighten::Spotlight::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

...

Light v ClusterGroup Bounding box intersection test.


Anchor
a4fe53bd25ccd00021691e9bd8a2c746b
a4fe53bd25ccd00021691e9bd8a2c746b

GEO_CONTROLLED_INLINE bool Enlighten::Spotlight::CachedData::IsIntersectingSystem

...

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

...

Simple Light V system BoundingBox intersection test.


Anchor
a73d84738c5f3d8cf78fcdd706813761e
a73d84738c5f3d8cf78fcdd706813761e

GEO_CONTROLLED_INLINE void Enlighten::Spotlight::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

...

Shades the given samples.


Anchor
a69e4f7106d8c359fc1195c25b5f89f55
a69e4f7106d8c359fc1195c25b5f89f55

GEO_CONTROLLED_INLINE Geo::v128 Enlighten::Spotlight::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

...

Calculate the average light colour for the samples.


Anchor
aea7be1d2b9b37f1671b339cac3e0ee79
aea7be1d2b9b37f1671b339cac3e0ee79

GEO_CONTROLLED_INLINE Geo::v128 Enlighten::Spotlight::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

...

Shades the given quad.