Rebel Fork Framework
Urho3D::LightAccumulator Struct Reference

Accumulated light for forward rendering. More...

#include <Urho3D/RenderPipeline/LightAccumulator.h>

Public Types

using LightData = ea::pair< float, unsigned >
 
using LightContainer = ea::fixed_vector< LightData, NumElements >
 
using VertexLightContainer = ea::array< unsigned, MaxVertexLights >
 

Public Member Functions

void ResetLights ()
 Reset lights.
 
void AccumulateLight (const LightAccumulatorContext &ctx, Drawable *geometry, LightImportance lightImportance, unsigned lightIndex, float penalty)
 Accumulate light.
 
void Cook ()
 Cook light if necessary.
 
VertexLightContainer GetVertexLights () const
 
ea::span< const LightData > GetPixelLights () const
 
unsigned GetVertexLightsHash () const
 

Public Attributes

SphericalHarmonicsDot9 sphericalHarmonics_
 Accumulated SH lights and ambient light.
 
ea::array< const ReflectionProbeData *, 2 > reflectionProbes_ {}
 Reflection probe.
 
float reflectionProbesBlendFactor_ {}
 

Static Public Attributes

static const unsigned MaxPixelLights = 4
 
static const unsigned MaxVertexLights = 4
 
static const unsigned NumElements = ea::max(MaxPixelLights + 1, 4u) + MaxVertexLights
 

Private Attributes

LightContainer lights_
 Container with per-pixel and per-vertex lights.
 
unsigned numImportantLights_ {}
 
unsigned numAutoLights_ {}
 
unsigned firstVertexLight_ {}
 
unsigned vertexLightsHash_ {}
 Hash of vertex lights. Non-zero.
 

Detailed Description

Accumulated light for forward rendering.

Member Function Documentation

◆ GetVertexLights()

VertexLightContainer Urho3D::LightAccumulator::GetVertexLights ( ) const
inline

Return light info, valid after cooking

Member Data Documentation

◆ MaxPixelLights

const unsigned Urho3D::LightAccumulator::MaxPixelLights = 4
static

Hints used for small buffer optimization


The documentation for this struct was generated from the following file: