Hymn to Beauty
C++ 3D Engine
Video::ZBinning Class Reference

Handles binning and tiling of lights. More...

#include <ZBinning.hpp>

Classes

struct  LightInfo
 Information about the lights in a scene. More...
 

Public Member Functions

 ZBinning (LowLevelRenderer *lowLevelRenderer, const glm::uvec2 &screenSize)
 Create new Z binning. More...
 
 ~ZBinning ()
 Destructor. More...
 
void SetRenderSurfaceSize (const glm::uvec2 &size)
 Configure tiles based on screen size. More...
 
void BinLights (CommandBuffer &commandBuffer, const std::vector< DirectionalLight > &directionalLights, const std::vector< Light > &lights, const glm::mat4 &projectionMatrix, float zNear, float zFar)
 Bin and tile the lights. More...
 
const LightInfoGetLightInfo ()
 Get the light info. More...
 

Detailed Description

Handles binning and tiling of lights.

Constructor & Destructor Documentation

◆ ZBinning()

Video::ZBinning::ZBinning ( LowLevelRenderer lowLevelRenderer,
const glm::uvec2 &  screenSize 
)

Create new Z binning.

Parameters
lowLevelRendererThe low-level renderer.
screenSizeThe size of the screen in pixels.
Todo:
Remove.

◆ ~ZBinning()

Video::ZBinning::~ZBinning ( )

Destructor.

Member Function Documentation

◆ BinLights()

void Video::ZBinning::BinLights ( CommandBuffer commandBuffer,
const std::vector< DirectionalLight > &  directionalLights,
const std::vector< Light > &  lights,
const glm::mat4 &  projectionMatrix,
float  zNear,
float  zFar 
)

Bin and tile the lights.

Parameters
commandBufferCommand buffer to record GPU work into.
directionalLightsVector of directional lights to push to the directional light buffer.
lightsVector of lights to push to the light buffer.
projectionMatrixProjection matrix.
zNearNear field.
zFarFar field.

◆ GetLightInfo()

const ZBinning::LightInfo & Video::ZBinning::GetLightInfo ( )

Get the light info.

Returns
The light info.

◆ SetRenderSurfaceSize()

void Video::ZBinning::SetRenderSurfaceSize ( const glm::uvec2 &  size)

Configure tiles based on screen size.

Parameters
sizeThe size of the render surface.

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