iridescence
Loading...
Searching...
No Matches
glk::ScreenSpaceLighting Class Reference

#include <screen_space_lighting.hpp>

Inheritance diagram for glk::ScreenSpaceLighting:
Collaboration diagram for glk::ScreenSpaceLighting:

Public Types

enum class  DIFFUSE_MODEL {
  ZERO , ONE , LAMBERT , DISNEY ,
  NORMALIZED_DISNEY , OREN_NAYAR
}
enum class  SPECULAR_MODEL { ZERO , PHONG , BLINN_PHONG , COOK_TORRANCE }
enum class  OCCLUSION_MODEL { ZERO , AMBIENT_OCCLUSION }
enum class  IRIDESCENCE_MODEL { ZERO , IRIDESCENCE1 , IRIDESCENCE2 , IRIDESCENCE3 }

Public Member Functions

 ScreenSpaceLighting (const Eigen::Vector2i &size=Eigen::Vector2i(1920, 1080), bool use_splatting=false)
virtual ~ScreenSpaceLighting () override
const glk::Texture & position () const
const glk::Texture & normal () const
const glk::Texture & occlusion () const
void set_diffuse_model (DIFFUSE_MODEL model)
void set_specular_model (SPECULAR_MODEL model)
void set_occlusion_model (OCCLUSION_MODEL model)
void set_iridescence_model (IRIDESCENCE_MODEL model)
float get_albedo () const
float get_roughness () const
void set_albedo (float albedo)
void set_roughness (float roughness)
int num_lights () const
void set_light (int i, const Eigen::Vector3f &pos, const Eigen::Vector4f &color)
void set_light (int i, const Eigen::Vector3f &pos, const Eigen::Vector4f &color, const Eigen::Vector2f &attenuation, float max_range)
void set_directional_light (int i, const Eigen::Vector3f &direction, const Eigen::Vector4f &color)
bool is_light_directional (int i) const
float get_light_range (int i) const
const Eigen::Vector2f & get_light_attenuation (int i) const
const Eigen::Vector3f & get_light_pos (int i) const
const Eigen::Vector3f & get_light_dir (int i) const
const Eigen::Vector4f & get_light_color (int i) const
void set_light_directional (int i, bool directional)
void set_light_range (int i, float range)
void set_light_attenuation (int i, const Eigen::Vector2f &attenuation)
void set_light_pos (int i, const Eigen::Vector3f &pos)
void set_light_dir (int i, const Eigen::Vector3f &dir)
void set_light_color (int i, const Eigen::Vector4f &color)
virtual void set_size (const Eigen::Vector2i &size) override
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
Public Member Functions inherited from glk::ScreenEffect
 ScreenEffect ()
virtual ~ScreenEffect ()

Member Enumeration Documentation

◆ DIFFUSE_MODEL

Enumerator
ZERO 
ONE 
LAMBERT 
DISNEY 
NORMALIZED_DISNEY 
OREN_NAYAR 

◆ IRIDESCENCE_MODEL

Enumerator
ZERO 
IRIDESCENCE1 
IRIDESCENCE2 
IRIDESCENCE3 

◆ OCCLUSION_MODEL

Enumerator
ZERO 
AMBIENT_OCCLUSION 

◆ SPECULAR_MODEL

Enumerator
ZERO 
PHONG 
BLINN_PHONG 
COOK_TORRANCE 

Constructor & Destructor Documentation

◆ ScreenSpaceLighting()

glk::ScreenSpaceLighting::ScreenSpaceLighting ( const Eigen::Vector2i & size = Eigen::Vector2i(1920, 1080),
bool use_splatting = false )

◆ ~ScreenSpaceLighting()

virtual glk::ScreenSpaceLighting::~ScreenSpaceLighting ( )
overridevirtual

Member Function Documentation

◆ draw()

virtual void glk::ScreenSpaceLighting::draw ( const TextureRenderer & renderer,
const glk::Texture & color_texture,
const glk::Texture & depth_texture,
const TextureRendererInput::Ptr & input,
glk::FrameBuffer * frame_buffer = nullptr )
overridevirtual

Implements glk::ScreenEffect.

◆ get_albedo()

float glk::ScreenSpaceLighting::get_albedo ( ) const

◆ get_light_attenuation()

const Eigen::Vector2f & glk::ScreenSpaceLighting::get_light_attenuation ( int i) const

◆ get_light_color()

const Eigen::Vector4f & glk::ScreenSpaceLighting::get_light_color ( int i) const

◆ get_light_dir()

const Eigen::Vector3f & glk::ScreenSpaceLighting::get_light_dir ( int i) const

◆ get_light_pos()

const Eigen::Vector3f & glk::ScreenSpaceLighting::get_light_pos ( int i) const

◆ get_light_range()

float glk::ScreenSpaceLighting::get_light_range ( int i) const

◆ get_roughness()

float glk::ScreenSpaceLighting::get_roughness ( ) const

◆ is_light_directional()

bool glk::ScreenSpaceLighting::is_light_directional ( int i) const

◆ normal()

const glk::Texture & glk::ScreenSpaceLighting::normal ( ) const

◆ num_lights()

int glk::ScreenSpaceLighting::num_lights ( ) const

◆ occlusion()

const glk::Texture & glk::ScreenSpaceLighting::occlusion ( ) const

◆ position()

const glk::Texture & glk::ScreenSpaceLighting::position ( ) const

◆ set_albedo()

void glk::ScreenSpaceLighting::set_albedo ( float albedo)

◆ set_diffuse_model()

void glk::ScreenSpaceLighting::set_diffuse_model ( DIFFUSE_MODEL model)

◆ set_directional_light()

void glk::ScreenSpaceLighting::set_directional_light ( int i,
const Eigen::Vector3f & direction,
const Eigen::Vector4f & color )

◆ set_iridescence_model()

void glk::ScreenSpaceLighting::set_iridescence_model ( IRIDESCENCE_MODEL model)

◆ set_light() [1/2]

void glk::ScreenSpaceLighting::set_light ( int i,
const Eigen::Vector3f & pos,
const Eigen::Vector4f & color )

◆ set_light() [2/2]

void glk::ScreenSpaceLighting::set_light ( int i,
const Eigen::Vector3f & pos,
const Eigen::Vector4f & color,
const Eigen::Vector2f & attenuation,
float max_range )

◆ set_light_attenuation()

void glk::ScreenSpaceLighting::set_light_attenuation ( int i,
const Eigen::Vector2f & attenuation )

◆ set_light_color()

void glk::ScreenSpaceLighting::set_light_color ( int i,
const Eigen::Vector4f & color )

◆ set_light_dir()

void glk::ScreenSpaceLighting::set_light_dir ( int i,
const Eigen::Vector3f & dir )

◆ set_light_directional()

void glk::ScreenSpaceLighting::set_light_directional ( int i,
bool directional )

◆ set_light_pos()

void glk::ScreenSpaceLighting::set_light_pos ( int i,
const Eigen::Vector3f & pos )

◆ set_light_range()

void glk::ScreenSpaceLighting::set_light_range ( int i,
float range )

◆ set_occlusion_model()

void glk::ScreenSpaceLighting::set_occlusion_model ( OCCLUSION_MODEL model)

◆ set_roughness()

void glk::ScreenSpaceLighting::set_roughness ( float roughness)

◆ set_size()

virtual void glk::ScreenSpaceLighting::set_size ( const Eigen::Vector2i & size)
overridevirtual

Reimplemented from glk::ScreenEffect.

◆ set_specular_model()

void glk::ScreenSpaceLighting::set_specular_model ( SPECULAR_MODEL model)

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