Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::LightEnvironment Struct Reference

Aggregated light data uploaded as a single SSBO each frame. More...

#include <LightEnvironment.h>

Public Member Functions

void Reset ()
 Resets light counts to zero without clearing the array.

Public Attributes

GPUPointLight PointLights [MAX_LIGHTS]
 Flat array of active point lights.
u32 PointLightCount = 0
 Number of valid entries in PointLights.
u32 SpotLightCount = 0
 Reserved; always 0 until spotlights are implemented.
float _pad [2] = {}

Detailed Description

Aggregated light data uploaded as a single SSBO each frame.

Populated by Scene::RenderScene and consumed by LightCullPass and GeometryPass. Call Reset at the start of each frame before re-submitting lights.

Note
An upload every frame is quite unecessary and will be tackled post v0.1

Member Function Documentation

◆ Reset()

void Raven::LightEnvironment::Reset ( )
inline

Resets light counts to zero without clearing the array.

Call once per frame before the scene re-submits its lights.

Member Data Documentation

◆ _pad

float Raven::LightEnvironment::_pad[2] = {}

◆ PointLightCount

u32 Raven::LightEnvironment::PointLightCount = 0

Number of valid entries in PointLights.

◆ PointLights

GPUPointLight Raven::LightEnvironment::PointLights[MAX_LIGHTS]

Flat array of active point lights.

◆ SpotLightCount

u32 Raven::LightEnvironment::SpotLightCount = 0

Reserved; always 0 until spotlights are implemented.


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