Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::GeometryPass Class Reference

Forward+ geometry pass; the primary shading stage of the Illumine pipeline. More...

#include <GeometryPass.h>

Classes

struct  Dependencies
 Shared GPU resources injected at init time by SceneRenderer. More...

Public Member Functions

FRAMEWORK_API void Init (u32 width, u32 height, const Dependencies &deps, const ShaderSettingsData &settings)
 Allocates the HDR framebuffer, pipeline, and settings UBOs.
FRAMEWORK_API void Shutdown ()
 Releases all GPU resources owned by this pass.
FRAMEWORK_API void Execute (const std::vector< StaticMeshSubmission > &meshes, const ShaderSettingsData &settings, const Crux::Frustum &frustum)
 Frustum-culls and renders all mesh submissions with PBR shading.
void RecreatePass (u32 tileX, u32 tileY, Ref< Image2D > shadowMap)
 Updates the tile info UBO and rebinds the shadow map after a resolution change.
Ref< FramebufferGetFramebuffer () const
 Returns the HDR colour framebuffer written by this pass.
Ref< RenderPassGetPass () const
 Returns the render pass object (consumed by SkyboxPass as a subpass target).
template<typename... Args>
void UpdateInput (Args &&... args)
 Updates a named input binding and rebakes the render pass descriptor set.

Detailed Description

Forward+ geometry pass; the primary shading stage of the Illumine pipeline.

Renders all opaque meshes. The HDR colour output is consumed by SkyboxPass and then ToneMapPass.

All shared UBOs are injected via the Dependencies struct at Init time; their lifetimes are guaranteed by SceneRenderer to exceed this pass.

Member Function Documentation

◆ Execute()

void Raven::GeometryPass::Execute ( const std::vector< StaticMeshSubmission > & meshes,
const ShaderSettingsData & settings,
const Crux::Frustum & frustum )

Frustum-culls and renders all mesh submissions with PBR shading.

Parameters
meshesStatic mesh submissions gathered by the scene this frame.
settingsShader knobs to upload before drawing.
frustumCamera frustum used to cull out-of-view meshes.

◆ GetFramebuffer()

Ref< Framebuffer > Raven::GeometryPass::GetFramebuffer ( ) const
inline

Returns the HDR colour framebuffer written by this pass.

◆ GetPass()

Ref< RenderPass > Raven::GeometryPass::GetPass ( ) const
inline

Returns the render pass object (consumed by SkyboxPass as a subpass target).

◆ Init()

void Raven::GeometryPass::Init ( u32 width,
u32 height,
const Dependencies & deps,
const ShaderSettingsData & settings )

Allocates the HDR framebuffer, pipeline, and settings UBOs.

Parameters
widthRender target width in pixels.
heightRender target height in pixels.
depsShared GPU resource references.
settingsInitial shader settings to upload.

◆ RecreatePass()

void Raven::GeometryPass::RecreatePass ( u32 tileX,
u32 tileY,
Ref< Image2D > shadowMap )
inline

Updates the tile info UBO and rebinds the shadow map after a resolution change.

Called by SceneRenderer when LightCullPass or ShadowPass signal that dependent resources need to be rebuilt.

Note
Post-v0.1 this should be generalised into a full pass recreation path.
Parameters
tileXNew tile count along X.
tileYNew tile count along Y.
shadowMapNew shadow depth map to bind.

◆ Shutdown()

void Raven::GeometryPass::Shutdown ( )

Releases all GPU resources owned by this pass.

◆ UpdateInput()

template<typename... Args>
void Raven::GeometryPass::UpdateInput ( Args &&... args)
inline

Updates a named input binding and rebakes the render pass descriptor set.

Template Parameters
ArgsForwarded to RenderPass::SetInput.

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