Skip to content

ludus::graphics::renderer::LightClusters

Ludus Wiki · API overview · Browse API

Struct

Inspectable CPU assignment, copied on success; no resource ownership or allocation.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp

#include <ludus/graphics/renderer/lighting.hpp>
struct ludus::graphics::renderer::LightClusters final

Fields

Lights

DirectLight ludus::graphics::renderer::LightClusters::Lights[MAX_DIRECT_LIGHTS][MAX_DIRECT_LIGHTS] {}
All admitted normalized lights in ascending SourceId order, at most 128.

Related types: DirectLight

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp

Count

ludus::foundation::uint32 ludus::graphics::renderer::LightClusters::Count = 0
Initialized light count; assignment never drops admitted lights.

Related types: ludus::foundation::uint32

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp

Counts

ludus::foundation::uint8 ludus::graphics::renderer::LightClusters::Counts[512][512] {}
Cell counts, capped at 32; x varies fastest, then y, then z.

Related types: ludus::foundation::uint8

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp

Overflow

bool ludus::graphics::renderer::LightClusters::Overflow[512][512] {}
Cells with more than 32 intersections evaluate the full list in the shader.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp

Texels

ludus::foundation::uint8 ludus::graphics::renderer::LightClusters::Texels[16384][16384] {}
Fixed-stride indices plus one; zero terminates. Overflow starts with 255. Uploaded as a nearest-sampled 64x64 RGBA8 texture (32 bytes per cell).

Related types: ludus::foundation::uint8

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp

OverflowCells

ludus::foundation::uint32 ludus::graphics::renderer::LightClusters::OverflowCells = 0
Number of overflow cells, explicitly reported rather than dropping lights.

Related types: ludus::foundation::uint32

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp

Assignments

ludus::foundation::uint32 ludus::graphics::renderer::LightClusters::Assignments = 0
Written cell/light intersections, at most 512*32.

Related types: ludus::foundation::uint32

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/lighting.hpp