Screen space effect
(Documentation unfinished)
Screen space attribute estimation
Input image without screen effects
Naive screen space ambient occlusion
#include <glk/effects/naive_screen_space_ambient_occlusion.hpp>
auto ssao = std::make_shared<glk::NaiveScreenSpaceAmbientOcclusion>();
viewer->set_screen_effect(ssao);
Smoothed screen space ambient occlusion
#include <glk/effects/screen_space_ambient_occlusion.hpp>
auto ssao = std::make_shared<glk::ScreenSpaceAmbientOcclusion>();
viewer->set_screen_effect(ssao);
Screen space lighting
#include <glk/effects/screen_space_lighting.hpp>
Eigen::Vector3f light0_pos(1.0f, 1.0f, 5.0f);
Eigen::Vector4f light0_color(2.0f, 2.0f, 2.0f, 1.0f);
Eigen::Vector3f light1_pos(0.0f, -2.0f, 2.0f);
Eigen::Vector4f light1_color(0.5f, 0.5f, 0.5f, 1.0f);
auto lighting_effect = std::make_shared<glk::ScreenSpaceLighting>();
lighting_effect->set_light(0, light0_pos, light0_color);
lighting_effect->set_light(1, light1_pos, light1_color);
viewer->enable_normal_buffer();
viewer->set_screen_effect(lighting_effect);