Computes screen space ambient occlusion from a depth and view-space normal buffer (brought to [0,1]).
More...
#include <SSAO.hpp>
Computes screen space ambient occlusion from a depth and view-space normal buffer (brought to [0,1]).
- See also
- GPU::Frag::SSAO
◆ Quality
SSAO upscaling/blurring algorithm.
Enumerator |
---|
LOW | Bilinear upscaling.
|
MEDIUM | Approximate box blur and bilinear upscaling.
|
HIGH | Bilateral blur.
|
◆ SSAO()
SSAO::SSAO |
( |
uint |
width, |
|
|
uint |
height, |
|
|
uint |
downscale, |
|
|
float |
radius, |
|
|
const std::string & |
name |
|
) |
| |
Constructor.
- Parameters
-
width | the internal resolution width |
height | the internal resolution height |
downscale | the downscaling factor for the resolution when computing AO |
radius | the SSAO intersection test radius |
name | the debug name for internal buffers |
◆ clear()
void SSAO::clear |
( |
| ) |
const |
◆ process()
void SSAO::process |
( |
const glm::mat4 & |
projection, |
|
|
const Texture & |
depthTex, |
|
|
const Texture & |
normalTex |
|
) |
| |
Compute SSAO using the input depth and normal buffers.
- Parameters
-
projection | the camera projection matrix |
depthTex | the depth texture |
normalTex | the view-space normal texture |
◆ quality()
Quality of the blur applied to the SSAO result.
- Returns
- a reference to the option
◆ radius()
Query the SSAO radius (should be larger for larger scene with large planar surfaces).
- Returns
- a reference to the radius parameter
◆ resize()
void SSAO::resize |
( |
uint |
width, |
|
|
uint |
height |
|
) |
| |
Resize the internal buffers.
- Parameters
-
width | the new width |
height | the new height |
◆ texture()
const Texture * SSAO::texture |
( |
| ) |
const |
Query the texture containing the result of the SSAO+blur pass.
- Returns
- the texture
The documentation for this class was generated from the following files:
- src/engine/processing/SSAO.hpp
- src/engine/processing/SSAO.cpp