class ShadowMapResourcePool

The FidelityFX Cauldron Framework shadow map resource pool.

File location: framework/cauldron/framework/inc/render/shadowmapresourcepool.h

Structs

Name

Description

ShadowMapView

An structure representing a view into a shadow map entry.

Construction

Return type

Description

Construction.

Methods

Return type

Description

uint32_t

Returns the number of currently allocated shadow map render targets.

const Texture *

GetRenderTarget (uint32_t index)
Returns a pointer to the specified render target “Texture“.

ShadowMapView

GetNewShadowMap (ShadowMapResolution resolution = ShadowMapResolution::Full )
Searches the shadow map atlas for an existing entry that will satisfy the request. If none is found, will add a new entry to the shadow map atlast and divide it up as needed to return the requested view.

void

ReleaseShadowMap (int index, int32_t cellIndex)
Releases the specified shadow map backing resource.

const ResourceFormat

Returns the format used by shadow map textures.

static Viewport

Converts the provided rect into a “Viewport“.

static Vec4

Generates a transformation vector used to transform shadow map data in the shader to correct lookup data.

Detailed description

The FidelityFX Cauldron Framework shadow map resource pool. Handles shadow map texture allocations and memory management.

Construction

ShadowMapResourcePool

Copied!

ShadowMapResourcePool ()

Construction.


Methods

GetRenderTargetCount

Copied!

uint32_t GetRenderTargetCount ()

Returns the number of currently allocated shadow map render targets.


GetRenderTarget

Copied!

const Texture * GetRenderTarget (uint32_t index)

Returns a pointer to the specified render target Texture.


GetNewShadowMap

Copied!

ShadowMapView  GetNewShadowMap (ShadowMapResolution  resolution = ShadowMapResolution::Full )

Searches the shadow map atlas for an existing entry that will satisfy the request. If none is found, will add a new entry to the shadow map atlast and divide it up as needed to return the requested view.


ReleaseShadowMap

Copied!

void ReleaseShadowMap (int index, int32_t cellIndex)

Releases the specified shadow map backing resource.


GetShadowMapTextureFormat

Copied!

const ResourceFormat  GetShadowMapTextureFormat () const

Returns the format used by shadow map textures.


GetViewport

Copied!

static Viewport  GetViewport (Rect  rect)

Converts the provided rect into a Viewport.


GetTransformation

Copied!

static Vec4  GetTransformation (Rect  rect)

Generates a transformation vector used to transform shadow map data in the shader to correct lookup data.