Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PostProcessStack Class Referencefinal

Apply post process effects to a HDR rendering of a scene. More...

#include <PostProcessStack.hpp>

Classes

struct  Settings
 Post processing stack settings. More...
 

Public Member Functions

 PostProcessStack (const glm::vec2 &resolution)
 
void process (const Texture &src, const glm::mat4 &proj, const Texture &depth, Texture &dst, uint layer=0)
 
void interface () override
 
void resize (uint width, uint height) override
 
Settingssettings ()
 
- Public Member Functions inherited from Renderer
 Renderer (const std::string &name)
 
virtual void draw (const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0)
 
virtual void resize (uint width, uint height)
 
virtual void interface ()
 
virtual ~Renderer ()=default
 
 Renderer (const Renderer &)=delete
 
Rendereroperator= (const Renderer &)=delete
 
 Renderer (Renderer &&)=delete
 
Rendereroperator= (Renderer &&)=delete
 
Layout outputColorFormat () const
 
Layout outputDepthFormat () const
 

Private Member Functions

void updateBlurPass ()
 

Private Attributes

Texture _bloomBuffer
 Bloom texture.
 
Texture _toneMapBuffer
 Tonemapping texture.
 
Texture _dofDownscaledColor
 DoF downscaled scene color texture.
 
Texture _dofCocAndDepth
 DoF CoC texture.
 
Texture _dofGatherBuffer
 DoF gathering texture.
 
Texture _resultTexture
 In-progress result of the stack.
 
std::unique_ptr< GaussianBlur_blur
 Bloom blur processing.
 
Program_bloomProgram
 Bloom program.
 
Program_bloomComposite
 Bloom compositing program.
 
Program_toneMappingProgram
 Tonemapping program.
 
Program_dofCocProgram
 CoC computation.
 
Program_dofGatherProgram
 DoF gathering step.
 
Program_dofCompositeProgram
 Composite DoF and input.
 
Program_fxaaProgram
 FXAA program.
 
Settings _settings
 The processing settings.
 

Additional Inherited Members

- Protected Attributes inherited from Renderer
std::string _name
 Debug name.
 
Layout _colorFormat = Layout::NONE
 The preferred output format for a given renderer.
 
Layout _depthFormat = Layout::NONE
 The preferred output format for a given renderer.
 

Detailed Description

Apply post process effects to a HDR rendering of a scene.

The effects currently provided are:

Inherits Renderer.

Constructor & Destructor Documentation

◆ PostProcessStack()

PostProcessStack::PostProcessStack ( const glm::vec2 &  resolution)
explicit

Constructor.

Parameters
resolutionthe initial rendering resolution

Member Function Documentation

◆ interface()

void PostProcessStack::interface ( )
overridevirtual

Display GUI exposing renderer options.

Note
The renderer can assume that a GUI window is currently open.

Reimplemented from Renderer.

◆ process()

void PostProcessStack::process ( const Texture src,
const glm::mat4 &  proj,
const Texture depth,
Texture dst,
uint  layer = 0 
)

Apply post processing to the scene. You can assume that there will be at least one operation applied so the same texture can be used as input and output.

Parameters
srcthe texture to process
projthe projection matrix (for DoF)
depththe scene depth buffer (for DoF)
dstthe destination texture
layerthe layer of the destination to write to

◆ resize()

void PostProcessStack::resize ( uint  width,
uint  height 
)
overridevirtual

Handle a window resize event.

Parameters
widththe new width
heightthe new height

Reimplemented from Renderer.

◆ settings()

Settings & PostProcessStack::settings ( )
inline

Get the stack settings.

Returns
a reference to the settings.

◆ updateBlurPass()

void PostProcessStack::updateBlurPass ( )
private

Update the bloom pass depth based on the current set radius.


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