27#ifndef EASY_RENDERER_AMBIENT_OCCLUSION_H
28#define EASY_RENDERER_AMBIENT_OCCLUSION_H
34#include <easy3d/core/types.h>
41 class FramebufferObject;
60 float radius()
const {
return radius_; }
65 float bias()
const {
return bias_; }
69 virtual unsigned int generate(
const std::vector<Model*>& models);
74 void init(
int w,
int h);
76 void geometry_pass(
const std::vector<Model*>& models);
80 void generate_noise(
int width,
int height);
91 std::vector<vec3> ssao_kernel_;
92 unsigned int noise_texture_;
Traditional Screen Space Ambient Occlusion (SSAO) technique.
Definition: ambient_occlusion.h:50
AmbientOcclusion(Camera *cam)
Constructor.
Definition: ambient_occlusion.cpp:56
unsigned int ssao_texture() const
Returns the generated SSAO texture ID.
Definition: ambient_occlusion.cpp:159
float radius() const
Returns the sample radius.
Definition: ambient_occlusion.h:60
void set_radius(float r)
Sets the sample radius (in pixels). Typical value is in range [0, 4].
Definition: ambient_occlusion.h:58
void set_bias(float b)
Sets the bias. Default value is 0.005.
Definition: ambient_occlusion.h:63
float bias() const
Returns the bias.
Definition: ambient_occlusion.h:65
virtual unsigned int generate(const std::vector< Model * > &models)
Generates the SSAO texture.
Definition: ambient_occlusion.cpp:144
A perspective or orthographic camera.
Definition: camera.h:116
An implementation of framebuffer object (FBO).
Definition: framebuffer_object.h:122
Definition: collider.cpp:182