3#include "ForwardLight.hpp"
5#include "renderers/DebugLightRenderer.hpp"
7#include "scene/Scene.hpp"
8#include "renderers/Renderer.hpp"
9#include "renderers/Culler.hpp"
11#include "resources/Texture.hpp"
12#include "input/ControllableCamera.hpp"
14#include "processing/SSAO.hpp"
39 explicit ForwardRenderer(
const glm::vec2 & resolution,
bool ssao,
const std::string & name);
44 void setScene(
const std::shared_ptr<Scene> & scene);
51 void resize(uint width, uint height)
override;
88 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
A renderer that shade each object as it is drawn in the scene directly.
Definition: ForwardRenderer.hpp:31
std::unique_ptr< ForwardLight > _lightsGPU
The lights renderer.
Definition: ForwardRenderer.hpp:93
Texture _sceneColor
Scene color texture.
Definition: ForwardRenderer.hpp:90
void draw(const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0) override
Definition: ForwardRenderer.cpp:327
void interface() override
Definition: ForwardRenderer.cpp:410
void renderTransparent(const Culler::List &visibles, const glm::mat4 &view, const glm::mat4 &proj)
Definition: ForwardRenderer.cpp:197
Program * _skyboxProgram
Skybox program.
Definition: ForwardRenderer.hpp:108
std::unique_ptr< Culler > _culler
Objects culler.
Definition: ForwardRenderer.hpp:115
bool _applySSAO
Screen space ambient occlusion.
Definition: ForwardRenderer.hpp:117
Texture & sceneDepth()
Definition: ForwardRenderer.cpp:423
Program * _atmoProgram
Atmospheric scattering program.
Definition: ForwardRenderer.hpp:110
std::unique_ptr< ForwardProbe > _probesGPU
The probes renderer.
Definition: ForwardRenderer.hpp:94
void resize(uint width, uint height) override
Definition: ForwardRenderer.cpp:403
Texture _sceneDepth
Scene depth texture.
Definition: ForwardRenderer.hpp:91
Program * _subsurfaceProgram
PBR with subsurface scattering.
Definition: ForwardRenderer.hpp:105
Program * _bgProgram
Planar background program.
Definition: ForwardRenderer.hpp:109
std::shared_ptr< Scene > _scene
The scene to render.
Definition: ForwardRenderer.hpp:114
Program * _transpIridProgram
Transparent PBR with iridescent Fresnel.
Definition: ForwardRenderer.hpp:100
Program * _clearCoatProgram
Basic PBR program with an additional clear coat specular layer.
Definition: ForwardRenderer.hpp:101
void renderOpaque(const Culler::List &visibles, const glm::mat4 &view, const glm::mat4 &proj)
Definition: ForwardRenderer.cpp:103
Program * _objectProgram
Basic PBR program.
Definition: ForwardRenderer.hpp:96
const Texture * _textureBrdf
The BRDF lookup table.
Definition: ForwardRenderer.hpp:112
Program * _parallaxProgram
Parallax mapping PBR program.
Definition: ForwardRenderer.hpp:97
Program * _sheenProgram
PBR with sheen BRDF.
Definition: ForwardRenderer.hpp:103
void renderBackground(const glm::mat4 &view, const glm::mat4 &proj, const glm::vec3 &pos)
Definition: ForwardRenderer.cpp:275
Program * _depthPrepass
Depth prepass program.
Definition: ForwardRenderer.hpp:106
void renderDepth(const Culler::List &visibles, const glm::mat4 &view, const glm::mat4 &proj)
Definition: ForwardRenderer.cpp:50
std::unique_ptr< SSAO > _ssaoPass
SSAO processing.
Definition: ForwardRenderer.hpp:92
Program * _iridescentProgram
PBR with iridescent Fresnel.
Definition: ForwardRenderer.hpp:104
void setScene(const std::shared_ptr< Scene > &scene)
Definition: ForwardRenderer.cpp:39
Program * _emissiveProgram
Parallax mapping PBR program.
Definition: ForwardRenderer.hpp:98
Program * _transparentProgram
Transparent PBR program.
Definition: ForwardRenderer.hpp:99
Program * _anisotropicProgram
Basic PBR with anisotropic roughness.
Definition: ForwardRenderer.hpp:102
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