3#include "DeferredLight.hpp"
4#include "ForwardLight.hpp"
6#include "renderers/DebugLightRenderer.hpp"
8#include "scene/Scene.hpp"
9#include "renderers/Renderer.hpp"
10#include "renderers/Culler.hpp"
12#include "resources/Texture.hpp"
13#include "input/ControllableCamera.hpp"
15#include "processing/SSAO.hpp"
98 explicit DeferredRenderer(
const glm::vec2 & resolution,
bool ssao,
const std::string & name);
103 void setScene(
const std::shared_ptr<Scene> & scene);
110 void resize(uint width, uint height)
override;
139 void renderBackground(
const glm::mat4 & view,
const glm::mat4 & proj,
const glm::vec3 & pos);
This class represents a camera as used in real-time rendering APIs. It provides a view and projection...
Definition: Camera.hpp:11
std::vector< long > List
Indices of selected objects.
Definition: Culler.hpp:15
Performs deferred rendering of a scene.
Definition: DeferredRenderer.hpp:90
std::unique_ptr< DeferredLight > _lightRenderer
The lights renderer.
Definition: DeferredRenderer.hpp:149
Program * _transparentProgram
Transparent PBR program.
Definition: DeferredRenderer.hpp:162
Texture _indirectLighting
Indirect lighting accumulation.
Definition: DeferredRenderer.hpp:146
Program * _objectProgram
Basic PBR program.
Definition: DeferredRenderer.hpp:154
std::unique_ptr< ForwardProbe > _fwdProbesGPU
The probes forward renderer for transparent objects.
Definition: DeferredRenderer.hpp:152
Program * _emissiveProgram
Emissive program.
Definition: DeferredRenderer.hpp:161
Texture _depthCopy
Lighting detph copy.
Definition: DeferredRenderer.hpp:147
void setScene(const std::shared_ptr< Scene > &scene)
Definition: DeferredRenderer.cpp:55
Program * _atmoProgram
Atmospheric scattering program.
Definition: DeferredRenderer.hpp:168
Texture _sceneAlbedo
Scene albedo.
Definition: DeferredRenderer.hpp:141
Program * _skyboxProgram
Skybox program.
Definition: DeferredRenderer.hpp:166
const Texture * _textureBrdf
The BRDF lookup table.
Definition: DeferredRenderer.hpp:170
bool _applySSAO
Screen space ambient occlusion.
Definition: DeferredRenderer.hpp:175
Texture _lighting
Lighting accumulation.
Definition: DeferredRenderer.hpp:145
Texture & sceneDepth()
Definition: DeferredRenderer.cpp:470
std::shared_ptr< Scene > _scene
The scene to render.
Definition: DeferredRenderer.hpp:172
std::unique_ptr< DeferredProbe > _probeRenderer
The probes renderer.
Definition: DeferredRenderer.hpp:150
Texture _sceneEffects
Scene material parameters.
Definition: DeferredRenderer.hpp:143
void draw(const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0) override
Definition: DeferredRenderer.cpp:337
void renderTransparent(const Culler::List &visibles, const glm::mat4 &view, const glm::mat4 &proj)
Definition: DeferredRenderer.cpp:186
Program * _parallaxProgram
Parallax mapping PBR program.
Definition: DeferredRenderer.hpp:155
std::unique_ptr< ForwardLight > _fwdLightsGPU
The lights forward renderer for transparent objects.
Definition: DeferredRenderer.hpp:151
std::unique_ptr< SSAO > _ssaoPass
SSAO processing.
Definition: DeferredRenderer.hpp:148
void renderOpaque(const Culler::List &visibles, const glm::mat4 &view, const glm::mat4 &proj)
Definition: DeferredRenderer.cpp:66
void interface() override
Definition: DeferredRenderer.cpp:456
Texture _sceneNormal
Scene normals.
Definition: DeferredRenderer.hpp:142
Program * _subsurfaceProgram
PBR with subsurface scattering.
Definition: DeferredRenderer.hpp:160
void renderBackground(const glm::mat4 &view, const glm::mat4 &proj, const glm::vec3 &pos)
Definition: DeferredRenderer.cpp:283
Program * _bgProgram
Planar background program.
Definition: DeferredRenderer.hpp:167
Program * _clearCoatProgram
Basic PBR program with an additional clear coat specular layer.
Definition: DeferredRenderer.hpp:156
Program * _iridescentProgram
PBR with iridescent Fresnel.
Definition: DeferredRenderer.hpp:159
Program * _transpIridProgram
Transparent PBR with iridescent Fresnel program.
Definition: DeferredRenderer.hpp:163
void resize(uint width, uint height) override
Definition: DeferredRenderer.cpp:442
Program * _probeNormalization
Indirect lighting normalization program.
Definition: DeferredRenderer.hpp:164
std::unique_ptr< Culler > _culler
Objects culler.
Definition: DeferredRenderer.hpp:173
Texture _sceneDepth
Scene depth.
Definition: DeferredRenderer.hpp:144
Program * _anisotropicProgram
Basic PBR with anisotropic roughness.
Definition: DeferredRenderer.hpp:157
Program * _sheenProgram
PBR with sheen BRDF.
Definition: DeferredRenderer.hpp:158
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Base structure of a renderer.
Definition: Renderer.hpp:10
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12