Blender V5.0
eevee_light.hh File Reference
#include "DNA_light_types.h"
#include "DRW_gpu_wrapper.hh"
#include "eevee_camera.hh"
#include "eevee_light_shared.hh"
#include "eevee_sampling.hh"
#include "eevee_sync.hh"

Go to the source code of this file.

Classes

struct  blender::eevee::Light
class  blender::eevee::LightModule

Namespaces

namespace  blender
namespace  blender::eevee

Typedefs

Light Object
using blender::eevee::LightCullingDataBuf = draw::StorageBuffer<LightCullingData>
using blender::eevee::LightCullingKeyBuf = draw::StorageArrayBuffer<uint, LIGHT_CHUNK, true>
using blender::eevee::LightCullingTileBuf = draw::StorageArrayBuffer<uint, LIGHT_CHUNK, true>
using blender::eevee::LightCullingZbinBuf = draw::StorageArrayBuffer<uint, CULLING_ZBIN_COUNT, true>
using blender::eevee::LightCullingZdistBuf = draw::StorageArrayBuffer<float, LIGHT_CHUNK, true>
using blender::eevee::LightDataBuf = draw::StorageArrayBuffer<LightData, LIGHT_CHUNK>

Detailed Description

The light module manages light data buffers and light culling system.

The culling follows the principles of Tiled Culling + Z binning from: "Improved Culling for Tiled and Clustered Rendering" by Michal Drobot http://advances.realtimerendering.com/s2017/2017_Sig_Improved_Culling_final.pdf

The culling is separated in 4 compute phases:

  • View Culling (select pass): Create a z distance and a index buffer of visible lights.
  • Light sorting: Outputs visible lights sorted by Z distance.
  • Z binning: Compute the Z bins min/max light indices.
  • Tile intersection: Fine grained 2D culling of each lights outputting a bitmap per tile.

Definition in file eevee_light.hh.