Traditional Screen Space Ambient Occlusion (SSAO) technique.
More...
#include <easy3d/renderer/ambient_occlusion.h>
|
| | AmbientOcclusion (Camera *cam) |
| | Constructor.
|
| |
|
virtual | ~AmbientOcclusion () |
| | Destructor.
|
| |
| void | set_radius (float r) |
| | Sets the sample radius (in pixels). Typical value is in range [0, 4].
|
| |
| float | radius () const |
| | Returns the sample radius.
|
| |
| void | set_bias (float b) |
| | Sets the bias. Default value is 0.005.
|
| |
| float | bias () const |
| | Returns the bias.
|
| |
| virtual unsigned int | generate (const std::vector< std::shared_ptr< Model > > &models) |
| | Generates the SSAO texture.
|
| |
| unsigned int | ssao_texture () const |
| | Returns the generated SSAO texture ID.
|
| |
Traditional Screen Space Ambient Occlusion (SSAO) technique.
Optimization tip: rendering with multi-effects (e.g., shadowing, SSAO) can benefit from using a shared geometry pass.
- Examples
- Tutorial_501_AmbientOcclusion/main.cpp.
◆ AmbientOcclusion()
Constructor.
- Parameters
-
| cam | The camera used in the view |
◆ bias()
Returns the bias.
- Returns
- The bias value
◆ generate()
| unsigned int generate |
( |
const std::vector< std::shared_ptr< Model > > & | models | ) |
|
|
virtual |
Generates the SSAO texture.
- Parameters
-
| models | The models to be rendered |
- Returns
- The SSAO texture ID
◆ radius()
Returns the sample radius.
- Returns
- The sample radius
◆ set_bias()
Sets the bias. Default value is 0.005.
- Parameters
-
◆ set_radius()
| void set_radius |
( |
float | r | ) |
|
|
inline |
Sets the sample radius (in pixels). Typical value is in range [0, 4].
- Parameters
-
◆ ssao_texture()
| unsigned int ssao_texture |
( |
| ) |
const |
Returns the generated SSAO texture ID.
- Returns
- The SSAO texture ID
The documentation for this class was generated from the following files:
- G:/3_code/Easy3D/easy3d/renderer/ambient_occlusion.h
- G:/3_code/Easy3D/easy3d/renderer/ambient_occlusion.cpp