Easy3D 2.5.3
AmbientOcclusion Class Reference

Traditional Screen Space Ambient Occlusion (SSAO) technique. More...

#include <easy3d/renderer/ambient_occlusion.h>

Public Member Functions

 AmbientOcclusion (Camera *cam)
 Constructor. More...
 
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< Model * > &models)
 Generates the SSAO texture. More...
 
unsigned int ssao_texture () const
 Returns the generated SSAO texture ID.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AmbientOcclusion()

AmbientOcclusion ( Camera cam)
explicit

Constructor.

Parameters
camThe camera used in the view

Member Function Documentation

◆ generate()

unsigned int generate ( const std::vector< Model * > &  models)
virtual

Generates the SSAO texture.

Returns
The SSAO texture ID

The documentation for this class was generated from the following files: