Horizon-Based Ambient Occlusion (HBAO) screen-space pass. More...
#include <AmbientOcclusionPass.h>
Public Member Functions | |
| FRAMEWORK_API void | Init (u32 width, u32 height, Ref< Image2D > depth, Ref< Image2D > normals, Ref< UniformBuffer > cameraUBO) |
| Allocates the AO image, framebuffer, pipeline, and settings UBO. | |
| FRAMEWORK_API void | Shutdown () |
| Releases all GPU resources owned by this pass. | |
| FRAMEWORK_API void | Execute () |
| Renders the fullscreen HBAO quad and writes the result to the AO image. | |
| Ref< Image2D > | GetAOImage () const |
| Returns the single-channel AO image written by Execute. | |
| HBAOSettings & | GetSettings () |
| Returns a mutable reference to the HBAO configuration. | |
| void | ApplySettings () |
| Immediately uploads the current HBAOSettings to the GPU UBO. | |
Horizon-Based Ambient Occlusion (HBAO) screen-space pass.
Samples the depth and view-space normals buffers produced by Prepass to compute per-pixel horizon-based occlusion. The resulting single-channel AO image is consumed by GeometryPass to attenuate the ambient IBL term.
Must execute after Prepass and before GeometryPass. Only runs when RendererFeatures::EnableAO is true.
|
inline |
Immediately uploads the current HBAOSettings to the GPU UBO.
Call after modifying GetSettings if the change should take effect before the next Execute.
| void Raven::AmbientOcclusionPass::Execute | ( | ) |
Renders the fullscreen HBAO quad and writes the result to the AO image.
Uploads the current HBAOSettings before dispatching. The caller should call ApplySettings if settings were changed this frame.
Returns the single-channel AO image written by Execute.
|
inline |
Returns a mutable reference to the HBAO configuration.
| void Raven::AmbientOcclusionPass::Init | ( | u32 | width, |
| u32 | height, | ||
| Ref< Image2D > | depth, | ||
| Ref< Image2D > | normals, | ||
| Ref< UniformBuffer > | cameraUBO ) |
Allocates the AO image, framebuffer, pipeline, and settings UBO.
| void Raven::AmbientOcclusionPass::Shutdown | ( | ) |
Releases all GPU resources owned by this pass.