Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::render::Lighting Class Reference

Lighting manager (rendering) More...

#include <OxygenEngine/render/lighting.h>

+ Inheritance diagram for oe::render::Lighting:
+ Collaboration diagram for oe::render::Lighting:

Public Member Functions

 Lighting ()
 Create the component.
 
void update ()
 Update lighting.
 
void fillShader (ShaderBase *shader) const noexcept
 Send All lights data to the shader.
 
void fillReflectionsShader (ShaderBase *shader) const noexcept
 Send Reflection probes data to the shader.
 
void fillTransparencyShader (ShaderBase *shader) const noexcept
 Send Transparency data (ie refractive buffer) to the shader.
 
void setRefractionTexture (const std::shared_ptr< Texture > &refraction_texture)
 Set texture that will be used as source for refractive surfaces.
 
const std::vector< glm::mat4 > getAreaLights () const
 Get Area lights Each one packed as a matrix where each xyz rows are the light edges, last component w1 is "double sided" and w2, w3, w4 are "light color".
 
void setDefaultReflectionProbe (Cubemap *cubemap, const uint32_t specular_size=256)
 Set Default reflection source.
 

Protected Attributes

std::vector< glm::vec3 > _point_light_positions
 
std::vector< glm::vec3 > _point_light_colors
 
std::vector< glm::mat4 > _area_light_matrices
 
ReflectionProbe _default_reflection_probe
 
Pbr _pbr
 
std::shared_ptr< Texture_brdf_texture
 
std::shared_ptr< Texture_refraction_texture
 

Additional Inherited Members

- Public Attributes inherited from oe::scene::Lighting
std::vector< PointLightpoint_lights
 
std::vector< AreaLightarea_lights
 

Detailed Description

Lighting manager (rendering)

Handles lighting + reflections of the scene

Member Function Documentation

◆ fillReflectionsShader()

void oe::render::Lighting::fillReflectionsShader ( ShaderBase shader) const
inlinenoexcept

Send Reflection probes data to the shader.

Parameters
shader

◆ fillShader()

void oe::render::Lighting::fillShader ( ShaderBase shader) const
inlinenoexcept

Send All lights data to the shader.

Parameters
shader

◆ fillTransparencyShader()

void oe::render::Lighting::fillTransparencyShader ( ShaderBase shader) const
inlinenoexcept

Send Transparency data (ie refractive buffer) to the shader.

Parameters
shader

◆ setRefractionTexture()

void oe::render::Lighting::setRefractionTexture ( const std::shared_ptr< Texture > &  refraction_texture)
inline

Set texture that will be used as source for refractive surfaces.

Note
If you use the pipeline, this texture is already set to use the output from lighting pass
Parameters
shader

◆ update()

void oe::render::Lighting::update ( )

Update lighting.

Parameters
deltaseconds since last call of update
flagscustom flags

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