Depth and view-space normals prepass. More...
#include <Prepass.h>
Public Member Functions | |
| FRAMEWORK_API void | Init (u32 width, u32 height, Ref< UniformBuffer > cameraUBO) |
| Creates the depth and normals images, framebuffer, pipeline, and render pass. | |
| FRAMEWORK_API void | Shutdown () |
| Releases all GPU resources owned by this pass. | |
| FRAMEWORK_API void | Execute (const std::vector< StaticMeshSubmission > &meshes, const Crux::Frustum &frustum) |
| Frustum-culls and renders all mesh submissions into the depth and normals targets. | |
| Ref< Image2D > | GetDepthImage () const |
| Returns the depth image written by this pass. | |
| Ref< Image2D > | GetNormalImage () const |
| Returns the view-space normals image written by this pass. | |
| template<typename... Args> | |
| void | UpdateInput (Args &&... args) |
| Updates a named input binding and rebakes the render pass descriptor set. | |
Depth and view-space normals prepass.
Renders all opaque geometry with a minimal vertex-only shader to populate:
Must execute before any pass that reads depth or normals.
| void Raven::Prepass::Execute | ( | const std::vector< StaticMeshSubmission > & | meshes, |
| const Crux::Frustum & | frustum ) |
Frustum-culls and renders all mesh submissions into the depth and normals targets.
| meshes | Static mesh submissions gathered by the scene this frame. |
| frustum | Camera frustum used to cull out-of-view meshes. |
Returns the depth image written by this pass.
DepthStencilAttachment layout after Execute. Returns the view-space normals image written by this pass.
| void Raven::Prepass::Init | ( | u32 | width, |
| u32 | height, | ||
| Ref< UniformBuffer > | cameraUBO ) |
Creates the depth and normals images, framebuffer, pipeline, and render pass.
| width | Render target width in pixels. |
| height | Render target height in pixels. |
| cameraUBO | Shared camera UBO providing the view-projection matrix. |
| void Raven::Prepass::Shutdown | ( | ) |
Releases all GPU resources owned by this pass.
|
inline |
Updates a named input binding and rebakes the render pass descriptor set.
| Args | Forwarded to RenderPass::SetInput. |