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< Pipeline > | GetPipeline () |
| Returns the skybox pipeline. | |
| Ref< RenderPass > | GetRenderPass () |
| Returns the render pass used by this pass. | |
| Ref< VertexBuffer > | GetVertexBuffer () |
| 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. | |
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.
| void Raven::SkyboxPass::Execute | ( | ) |
Renders the skybox cube into the shared HDR framebuffer.
|
inline |
Returns the render pass used by this pass.
|
inline |
Returns the unit cube vertex buffer.
| 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.
| framebuffer | Shared HDR framebuffer from GeometryPass. |
| depthImage | Shared depth image from Prepass (used to reject foreground pixels). |
| activeCubemap | Initial environment cubemap to sample. |
| cameraUBO | Shared camera UBO providing the view-projection matrix. |
| void Raven::SkyboxPass::Shutdown | ( | ) |
Releases all GPU resources owned by this pass.
|
inline |
Rebinds a named input (e.g. the active cubemap) and rebakes the descriptor set.
Called by SceneRenderer when the active cubemap changes.
| Args | Forwarded to RenderPass::SetInput. |