Kanzi 4.1.0
kanzi::LightBuffer Class Reference

Packs gathered lights into a std140 uniform buffer with 6 vec4s per light. More...

#include <kanzi/core.ui/graphics3d/light_buffer.hpp>

Public Member Functions

 LightBuffer ()
 Constructor.
 
void populate (const GatherLightsRenderPass &gatherPass)
 Populates the buffer from gathered light ranges.
 
ConstByteSpan toByteSpan () const
 Returns the buffer contents as a byte span.
 

Static Public Attributes

static constexpr size_t MaxLights
 Maximum number of lights in the buffer.
 

Detailed Description

Packs gathered lights into a std140 uniform buffer with 6 vec4s per light.

Constructor & Destructor Documentation

◆ LightBuffer()

kanzi::LightBuffer::LightBuffer ( )
explicit

Constructor.

Member Function Documentation

◆ populate()

void kanzi::LightBuffer::populate ( const GatherLightsRenderPass & gatherPass)

Populates the buffer from gathered light ranges.

Parameters
gatherPassGather lights render pass that has been executed.

◆ toByteSpan()

ConstByteSpan kanzi::LightBuffer::toByteSpan ( ) const

Returns the buffer contents as a byte span.

Member Data Documentation

◆ MaxLights

constexpr size_t kanzi::LightBuffer::MaxLights
staticconstexpr

Maximum number of lights in the buffer.

Must match KZ_MAX_LIGHTS in lights.glsl.


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