Nebula
Loading...
Searching...
No Matches
Lighting Namespace Reference

Detailed Description

The lighting subsystem allows for attaching light source functionality to a GraphicsEntityId.

It currently supports a deferred renderer, dynamic global and local shadows, as well as light probes which are used for dynamic or static environment reflections and irradiance.

Classes

class  CSMUtil
 Helper class for creating and rendering Cascading Shadow Maps. More...
 
class  LightContext
 

Functions

void ComputeFrustumPoints (float cascadeBegin, float cascadeEnd, const float aspect, const float fov, Math::vec4 *frustumCorners)
 Compute frustum points using computed frustum and cascade intervals, basically stolen from Math::frustum.
 
void ComputeAABB (vec4 *lightAABBPoints, const vec4 &sceneCenter, const vec4 &sceneExtents)
 
 __ImplementContext (LightContext, LightContext::genericLightAllocator)
 

Variables

struct { 
 
   Graphics::GraphicsEntityId   Lighting::globalLightEntity = Graphics::GraphicsEntityId::Invalid() 
 
   Util::Array< Graphics::GraphicsEntityId >   Lighting::spotLightEntities 
 
   Util::RingBuffer< Graphics::GraphicsEntityId >   Lighting::shadowcastingLocalLights 
 
   Shared::ShadowViewConstants   Lighting::shadowMatrixUniforms 
 
   CoreGraphics::TextureId   Lighting::localLightShadows = CoreGraphics::InvalidTextureId 
 
   CoreGraphics::TextureId   Lighting::globalLightShadowMap = CoreGraphics::InvalidTextureId 
 
   CoreGraphics::TextureId   Lighting::terrainShadowMap = CoreGraphics::InvalidTextureId 
 
   uint   Lighting::terrainShadowMapSize 
 
   uint   Lighting::terrainSize 
 
   MaterialTemplates::BatchGroup   Lighting::spotlightsBatchCode 
 
   MaterialTemplates::BatchGroup   Lighting::globalLightsBatchCode 
 
   CSMUtil   Lighting::csmUtil { Shared::NUM_CASCADES } 
 
lightServerState 
 
struct { 
 
   CoreGraphics::ShaderId   Lighting::classificationShader 
 
   CoreGraphics::ShaderProgramId   Lighting::cullProgram 
 
   CoreGraphics::ShaderProgramId   Lighting::debugProgram 
 
   CoreGraphics::ShaderProgramId   Lighting::renderProgram 
 
   CoreGraphics::BufferId   Lighting::clusterLightIndexLists 
 
   CoreGraphics::BufferSet   Lighting::stagingClusterLightsList 
 
   CoreGraphics::BufferId   Lighting::clusterLightsList 
 
   CoreGraphics::BufferId   Lighting::clusterPointLights 
 
   CoreGraphics::BufferId   Lighting::clusterSpotLights 
 
   CoreGraphics::ResourceTableId   Lighting::resourceTable 
 
   uint   Lighting::numThreadsThisFrame 
 
   LightsCluster::LightLists   Lighting::lightList 
 
clusterState 
 
struct { 
 
   CoreGraphics::ShaderId   Lighting::combineShader 
 
   CoreGraphics::ShaderProgramId   Lighting::combineProgram 
 
   Util::FixedArray< CoreGraphics::ResourceTableId >   Lighting::resourceTables 
 
combineState 
 
struct { 
 
   CoreGraphics::TextureId   Lighting::ltcLut0 
 
   CoreGraphics::TextureId   Lighting::ltcLut1 
 
textureState 
 

Function Documentation

◆ __ImplementContext()

Lighting::__ImplementContext ( LightContext ,
LightContext::genericLightAllocator  )

◆ ComputeAABB()

void Lighting::ComputeAABB ( vec4 * lightAABBPoints,
const vec4 & sceneCenter,
const vec4 & sceneExtents )

◆ ComputeFrustumPoints()

void Lighting::ComputeFrustumPoints ( float cascadeBegin,
float cascadeEnd,
const float aspect,
const float fov,
Math::vec4 * frustumCorners )

Compute frustum points using computed frustum and cascade intervals, basically stolen from Math::frustum.

Variable Documentation

◆ classificationShader

CoreGraphics::ShaderId Lighting::classificationShader

◆ clusterLightIndexLists

CoreGraphics::BufferId Lighting::clusterLightIndexLists

◆ clusterLightsList

CoreGraphics::BufferId Lighting::clusterLightsList

◆ clusterPointLights

CoreGraphics::BufferId Lighting::clusterPointLights

◆ clusterSpotLights

CoreGraphics::BufferId Lighting::clusterSpotLights

◆ [struct]

struct { ... } Lighting::clusterState

◆ combineProgram

CoreGraphics::ShaderProgramId Lighting::combineProgram

◆ combineShader

CoreGraphics::ShaderId Lighting::combineShader

◆ [struct]

struct { ... } Lighting::combineState

◆ csmUtil

CSMUtil Lighting::csmUtil { Shared::NUM_CASCADES }

◆ cullProgram

CoreGraphics::ShaderProgramId Lighting::cullProgram

◆ debugProgram

CoreGraphics::ShaderProgramId Lighting::debugProgram

◆ globalLightEntity

Graphics::GraphicsEntityId Lighting::globalLightEntity = Graphics::GraphicsEntityId::Invalid()

◆ globalLightsBatchCode

MaterialTemplates::BatchGroup Lighting::globalLightsBatchCode

◆ globalLightShadowMap

CoreGraphics::TextureId Lighting::globalLightShadowMap = CoreGraphics::InvalidTextureId

◆ lightList

LightsCluster::LightLists Lighting::lightList

◆ [struct]

struct { ... } Lighting::lightServerState

◆ localLightShadows

CoreGraphics::TextureId Lighting::localLightShadows = CoreGraphics::InvalidTextureId

◆ ltcLut0

CoreGraphics::TextureId Lighting::ltcLut0

◆ ltcLut1

CoreGraphics::TextureId Lighting::ltcLut1

◆ numThreadsThisFrame

uint Lighting::numThreadsThisFrame

◆ renderProgram

CoreGraphics::ShaderProgramId Lighting::renderProgram

◆ resourceTable

CoreGraphics::ResourceTableId Lighting::resourceTable

◆ resourceTables

◆ shadowcastingLocalLights

Util::RingBuffer<Graphics::GraphicsEntityId> Lighting::shadowcastingLocalLights

◆ shadowMatrixUniforms

Shared::ShadowViewConstants Lighting::shadowMatrixUniforms

◆ spotLightEntities

Util::Array<Graphics::GraphicsEntityId> Lighting::spotLightEntities

◆ spotlightsBatchCode

MaterialTemplates::BatchGroup Lighting::spotlightsBatchCode

◆ stagingClusterLightsList

CoreGraphics::BufferSet Lighting::stagingClusterLightsList

◆ terrainShadowMap

CoreGraphics::TextureId Lighting::terrainShadowMap = CoreGraphics::InvalidTextureId

◆ terrainShadowMapSize

uint Lighting::terrainShadowMapSize

◆ terrainSize

uint Lighting::terrainSize

◆ [struct]

struct { ... } Lighting::textureState