1#ifndef GLK_SCREEN_SPACE_LIGHTING_HPP
2#define GLK_SCREEN_SPACE_LIGHTING_HPP
8class ScreenSpaceSplatting;
9class ScreenSpaceAttributeEstimation;
18 ScreenSpaceLighting(
const Eigen::Vector2i& size = Eigen::Vector2i(1920, 1080),
bool use_splatting =
false);
37 void set_light(
int i,
const Eigen::Vector3f& pos,
const Eigen::Vector4f& color);
38 void set_light(
int i,
const Eigen::Vector3f& pos,
const Eigen::Vector4f& color,
const Eigen::Vector2f& attenuation,
float max_range);
55 virtual void set_size(
const Eigen::Vector2i& size)
override;
67 std::unique_ptr<glk::ScreenSpaceSplatting> splatting;
68 std::unique_ptr<glk::ScreenSpaceAttributeEstimation> ssae;
69 std::unique_ptr<glk::Texture> iridescence_texture;
82 std::vector<int> light_directional;
83 std::vector<float> light_range;
84 std::vector<Eigen::Vector2f> light_attenuation;
85 std::vector<Eigen::Vector3f> light_pos;
86 std::vector<Eigen::Vector4f> light_color;
Definition frame_buffer.hpp:12
Definition glsl_shader.hpp:20
Definition screen_effect.hpp:15
Definition screen_space_lighting.hpp:11
IRIDESCENCE_MODEL
Definition screen_space_lighting.hpp:16
void set_roughness(float roughness)
virtual void set_size(const Eigen::Vector2i &size) override
void set_albedo(float albedo)
void set_light(int i, const Eigen::Vector3f &pos, const Eigen::Vector4f &color, const Eigen::Vector2f &attenuation, float max_range)
bool is_light_directional(int i) const
DIFFUSE_MODEL
Definition screen_space_lighting.hpp:13
virtual void draw(const TextureRenderer &renderer, const glk::Texture &color_texture, const glk::Texture &depth_texture, const TextureRendererInput::Ptr &input, glk::FrameBuffer *frame_buffer=nullptr) override
void set_light_pos(int i, const Eigen::Vector3f &pos)
const glk::Texture & occlusion() const
void set_diffuse_model(DIFFUSE_MODEL model)
const Eigen::Vector3f & get_light_pos(int i) const
const Eigen::Vector2f & get_light_attenuation(int i) const
float get_light_range(int i) const
void set_light_attenuation(int i, const Eigen::Vector2f &attenuation)
virtual ~ScreenSpaceLighting() override
void set_occlusion_model(OCCLUSION_MODEL model)
ScreenSpaceLighting(const Eigen::Vector2i &size=Eigen::Vector2i(1920, 1080), bool use_splatting=false)
const glk::Texture & normal() const
float get_roughness() const
void set_light_directional(int i, bool directional)
const glk::Texture & position() const
void set_specular_model(SPECULAR_MODEL model)
SPECULAR_MODEL
Definition screen_space_lighting.hpp:14
const Eigen::Vector3f & get_light_dir(int i) const
void set_light(int i, const Eigen::Vector3f &pos, const Eigen::Vector4f &color)
const Eigen::Vector4f & get_light_color(int i) const
void set_light_dir(int i, const Eigen::Vector3f &dir)
void set_light_color(int i, const Eigen::Vector4f &color)
OCCLUSION_MODEL
Definition screen_space_lighting.hpp:15
void set_light_range(int i, float range)
void set_iridescence_model(IRIDESCENCE_MODEL model)
void set_directional_light(int i, const Eigen::Vector3f &direction, const Eigen::Vector4f &color)
TextureRenderer.
Definition texture_renderer.hpp:20
Definition texture.hpp:10
Definition async_buffer_copy.hpp:6
std::shared_ptr< TextureRendererInput > Ptr
Definition texture_renderer_input.hpp:13