Skip to content

GBufferRenderModule

class GBufferRenderModule : public cauldron::RenderModule, public cauldron::ContentListener

The GBuffer render module is responsible for rendering the gbuffer for all loaded scene entities. If initialized to do so, will also output motion vectors for the frame.

Inherits from: public cauldron::RenderModule, public cauldron::ContentListener

Public Interface

Constructor:

GBufferRenderModule

inline GBufferRenderModule()

Construction.

Attributes: inline

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 62, column 5)

Destructor:

~GBufferRenderModule

virtual ~GBufferRenderModule()

Destruction.

Attributes: virtual

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 67, column 13)

Public Functions:

Init

virtual void Init(const json &initData) override

Initialization function. Sets up target pointers and other global data.

Parameters:

NameTypeDefault
initDataconst json &

Attributes: virtual

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 72, column 10)

Execute

virtual void Execute(double deltaTime, cauldron::CommandList *pCmdList) override

Renders all active geometric entities in the Scene.

Parameters:

NameTypeDefault
deltaTimedouble
pCmdListcauldron::CommandList *

Attributes: virtual

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 77, column 10)

OnNewContentLoaded

virtual void OnNewContentLoaded(cauldron::ContentBlock *pContentBlock) override

Callback invoked when new content is loaded so we can create additional pipelines if needed.

Parameters:

NameTypeDefault
pContentBlockcauldron::ContentBlock *

Attributes: virtual

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 82, column 10)

OnContentUnloaded

virtual void OnContentUnloaded(cauldron::ContentBlock *pContentBlock) override

Callback invoked when content is unloaded. Permits us to clean things up if needed.

Parameters:

NameTypeDefault
pContentBlockcauldron::ContentBlock *

Attributes: virtual

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 87, column 10)

Private Interface

Private Functions:

GetPipelinePermutationID

uint32_t GetPipelinePermutationID(const cauldron::Surface *pSurface)

Parameters:

NameTypeDefault
pSurfaceconst cauldron::Surface *

Returns: uint32_t

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 95, column 14)

AddTexture

int32_t AddTexture(const cauldron::Material *pMaterial, const cauldron::TextureClass textureClass, int32_t &textureSamplerIndex)

Parameters:

NameTypeDefault
pMaterialconst cauldron::Material *
textureClassconst cauldron::TextureClass
textureSamplerIndexint32_t &

Returns: int32_t

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 96, column 14)

RemoveTexture

void RemoveTexture(int32_t index)

Parameters:

NameTypeDefault
indexint32_t

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 97, column 10)

Private Members:

bool m_VariableShading

bool m_VariableShading = = false

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 101, column 37)

bool m_GenerateMotionVectors

bool m_GenerateMotionVectors = = false

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 102, column 37)

cauldron::RootSignature * m_pRootSignature

cauldron::RootSignature * m_pRootSignature = = nullptr

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 103, column 36)

cauldron::ParameterSet * m_pParameterSet

cauldron::ParameterSet * m_pParameterSet = = nullptr

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 104, column 36)

const cauldron::Texture * m_pAlbedoRenderTarget

const cauldron::Texture * m_pAlbedoRenderTarget = = nullptr

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 105, column 36)

const cauldron::Texture * m_pNormalRenderTarget

const cauldron::Texture * m_pNormalRenderTarget = = nullptr

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 106, column 36)

const cauldron::Texture * m_pAoRoughnessMetallicTarget

const cauldron::Texture * m_pAoRoughnessMetallicTarget = = nullptr

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 107, column 36)

const cauldron::Texture * m_pDepthTarget

const cauldron::Texture * m_pDepthTarget = = nullptr

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 108, column 36)

const cauldron::Texture * m_pMotionVector

const cauldron::Texture * m_pMotionVector = = nullptr

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 109, column 36)

std::vector<const cauldron::RasterView *> m_RasterViews

std::vector<const cauldron::RasterView *> m_RasterViews = = &#123;&#125;

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 110, column 17)

std::vector<BoundTexture> m_Textures

std::vector<BoundTexture> m_Textures

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 117, column 23)

std::vector<cauldron::Sampler *> m_Samplers

std::vector<cauldron::Sampler *> m_Samplers

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 118, column 17)

std::mutex m_CriticalSection

std::mutex m_CriticalSection

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 119, column 16)

std::vector<PipelineRenderGroup> m_PipelineRenderGroups

std::vector<PipelineRenderGroup> m_PipelineRenderGroups

Attributes: private

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 136, column 28)

Source: framework/rendermodules/gbuffer/gbufferrendermodule.h (line 55, column 1)