1#ifndef OE_SCENE_COMPONENT_LIGHTING_H 
    2#define OE_SCENE_COMPONENT_LIGHTING_H 
    9#include "../../render/pbr.h" 
   29        std::shared_ptr<oe::render::Cubemap> irradiance = 
nullptr;
 
   30        std::shared_ptr<oe::render::Cubemap> specular = 
nullptr;
 
 
   53            virtual void onUpdate(
const std::chrono::nanoseconds , 
const int8_t ) 
override;
 
   81                _refraction_texture = refraction_texture;
 
 
   90                return _area_light_matrices;
 
 
  102            std::vector<std::pair<PointLight*, oe::scene::Node*>> _point_lights;
 
  103            std::vector<std::pair<AreaLight*, oe::scene::Node*>> _area_lights;
 
  105            std::vector<glm::vec3> _point_light_positions;
 
  106            std::vector<glm::vec3> _point_light_colors;
 
  108            std::vector<glm::mat4> _area_light_matrices;
 
  116            std::shared_ptr<oe::render::Texture> _brdf_texture;
 
  117            std::shared_ptr<oe::render::Texture> _refraction_texture;
 
 
Area light component.
Definition lighting.h:145
 
glm::vec3 color
Definition lighting.h:151
 
Lighting component.
Definition lighting.h:39
 
virtual void onUpdate(const std::chrono::nanoseconds, const int8_t) override
Update lighting.
 
void fillReflectionsShader(oe::render::ShaderBase &shader) const noexcept
Send Reflection probes data to the shader.
 
void fillShader(oe::render::ShaderBase &shader) const noexcept
Send All lights data to the shader.
 
void setRefractionTexture(const std::shared_ptr< oe::render::Texture > &refraction_texture)
Set texture that will be used as source for refractive surfaces.
Definition lighting.h:79
 
void setDefaultReflectionProbe(std::shared_ptr< oe::render::Cubemap > cubemap)
Set Default reflection source.
 
void fillTransparencyShader(oe::render::ShaderBase &shader) const noexcept
Send Transparency data (ie refractive buffer) to the shader.
 
Lighting(oe::scene::Manager &, oe::render::TextureManager &texture_manager)
Create the component.
 
int8_t match_flags
Do not update lighting unless flags is same as this value.
Definition lighting.h:99
 
const std::vector< glm::mat4 > getAreaLights() const
Get Area lights Each one packed as a matrix where each xyz rows are the light edges,...
Definition lighting.h:88
 
Point light component.
Definition lighting.h:129
 
glm::vec3 color
Definition lighting.h:136
 
Physically Based Rendering.
Definition pbr.h:14
 
Shader class.
Definition shader_base.h:33
 
handles the load and deletion of textures/cubemaps
Definition texture_manager.h:51
 
Scene manager.
Definition manager.h:21
 
Parent class of components that can be bound to a Node.
Definition node.h:15
 
Parent class of components that can be bound to a scene::Manager.
Definition scene.h:15
 
Scene / node components (camera, lighting, ...)
Definition pipeline.h:9
 
Render related abstractions (Shader, Framebuffer, Cubemaps, Textures)
Definition opengl.h:10
 
A reflection environment.
Definition lighting.h:28