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

Renders the environment cubemap as a background skybox. More...

#include <SkyboxPass.h>

Public Member Functions

FRAMEWORK_API void Init (Ref< Framebuffer > framebuffer, Ref< Image2D > depthImage, Ref< TextureCube > activeCubemap, Ref< UniformBuffer > cameraUBO)
 Initialises the skybox pipeline, render pass, and cube vertex buffer.
FRAMEWORK_API void Shutdown ()
 Releases all GPU resources owned by this pass.
FRAMEWORK_API void Execute ()
 Renders the skybox cube into the shared HDR framebuffer.
Ref< PipelineGetPipeline ()
 Returns the skybox pipeline.
Ref< RenderPassGetRenderPass ()
 Returns the render pass used by this pass.
Ref< VertexBufferGetVertexBuffer ()
 Returns the unit cube vertex buffer.
template<typename... Args>
void UpdateInput (Args &&... args)
 Rebinds a named input (e.g. the active cubemap) and rebakes the descriptor set.

Detailed Description

Renders the environment cubemap as a background skybox.

Draws a unit cube with a reverse-depth trick so that the skybox only fills pixels not covered by opaque geometry. Renders into the same Framebuffer as GeometryPass using the shared depth attachment, so it must execute after geometry but before ToneMapPass.

Member Function Documentation

◆ Execute()

void Raven::SkyboxPass::Execute ( )

Renders the skybox cube into the shared HDR framebuffer.

◆ GetPipeline()

Ref< Pipeline > Raven::SkyboxPass::GetPipeline ( )
inline

Returns the skybox pipeline.

◆ GetRenderPass()

Ref< RenderPass > Raven::SkyboxPass::GetRenderPass ( )
inline

Returns the render pass used by this pass.

◆ GetVertexBuffer()

Ref< VertexBuffer > Raven::SkyboxPass::GetVertexBuffer ( )
inline

Returns the unit cube vertex buffer.

◆ Init()

void Raven::SkyboxPass::Init ( Ref< Framebuffer > framebuffer,
Ref< Image2D > depthImage,
Ref< TextureCube > activeCubemap,
Ref< UniformBuffer > cameraUBO )

Initialises the skybox pipeline, render pass, and cube vertex buffer.

Parameters
framebufferShared HDR framebuffer from GeometryPass.
depthImageShared depth image from Prepass (used to reject foreground pixels).
activeCubemapInitial environment cubemap to sample.
cameraUBOShared camera UBO providing the view-projection matrix.

◆ Shutdown()

void Raven::SkyboxPass::Shutdown ( )

Releases all GPU resources owned by this pass.

◆ UpdateInput()

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

Rebinds a named input (e.g. the active cubemap) and rebakes the descriptor set.

Called by SceneRenderer when the active cubemap changes.

Template Parameters
ArgsForwarded to RenderPass::SetInput.

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