Apply a light onto the lighting buffer using a geometric proxy (cone, sphere, screenquad). By processing all lights, the final lighting is accumulated in the buffer.
More...
#include <DeferredLight.hpp>
|
std::vector< const Texture * > | _textures |
| G-buffer input textures.
|
|
const Mesh * | _sphere |
| Point light supporting geometry.
|
|
const Mesh * | _cone |
| Spot light supporting geometry.
|
|
Program * | _dirProgram |
| Directional light shader.
|
|
Program * | _pointProgram |
| Point light shader.
|
|
Program * | _spotProgram |
| Spot light shader.
|
|
glm::mat4 | _view = glm::mat4(1.0f) |
| Cached camera view matrix.
|
|
glm::mat4 | _proj = glm::mat4(1.0f) |
| Cached camera projection matrix.
|
|
Apply a light onto the lighting buffer using a geometric proxy (cone, sphere, screenquad). By processing all lights, the final lighting is accumulated in the buffer.
- See also
- GPUShaders::Frag::Spot_light_pbr, GPUShaders::Frag::Point_light_pbr, GPUShaders::Frag::Directional_light_pbr
Inherits LightRenderer.
◆ DeferredLight()
DeferredLight::DeferredLight |
( |
const Texture * |
texAlbedo, |
|
|
const Texture * |
texNormals, |
|
|
const Texture * |
texDepth, |
|
|
const Texture * |
texEffects |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
texAlbedo | the texture containing the albedo |
texNormals | the texture containing the surface normals |
texDepth | the texture containing the depth |
texEffects | the texture containing the material properties |
◆ draw() [1/3]
Apply a directional lighting using a supporting quad.
- Parameters
-
light | the light to compute the contribution of |
Implements LightRenderer.
◆ draw() [2/3]
void DeferredLight::draw |
( |
const PointLight * |
light | ) |
|
|
overridevirtual |
Apply a point lighting using a supporting sphere.
- Parameters
-
light | the light to compute the contribution of |
Implements LightRenderer.
◆ draw() [3/3]
void DeferredLight::draw |
( |
const SpotLight * |
light | ) |
|
|
overridevirtual |
Apply a spot lighting using a supporting cone.
- Parameters
-
light | the light to compute the contribution of |
Implements LightRenderer.
◆ updateCameraInfos()
void DeferredLight::updateCameraInfos |
( |
const glm::mat4 & |
viewMatrix, |
|
|
const glm::mat4 & |
projMatrix |
|
) |
| |
Set the current user view and projection matrices.
- Parameters
-
viewMatrix | the camera view matrix |
projMatrix | the camera projection matrix |
The documentation for this class was generated from the following files: