The Dirtchamber
A mixed reality testing environment for real-time global illumination algorithms
|
A default implementation of the postprocessor. More...
#include <pppipe.h>
Public Member Functions | |
virtual void | render (ID3D11DeviceContext *context, ID3D11RenderTargetView *backbuffer) |
Render the entire postprocess (i.e. all steps of the pipeline) and write the result to backbuffer. | |
cb_pp_parameters & | parameters () |
Return local cbuffer parameters. | |
const cb_pp_parameters & | parameters () const |
Return local cbuffer parameters. | |
Public Member Functions inherited from dune::postprocessor | |
void | set_shader (ID3D11Device *device, ID3DBlob *input_binary, ID3D11VertexShader *fs_triangle, UINT buffers_start_slot) |
Set shader parameters for the postprocessing pipeline. More... | |
void | resize (UINT width, UINT height) |
Resizes the frontbuffer into which a deferred renderer writes its image to. | |
render_target & | frontbuffer () |
Render into this render_target for the postprocessor. | |
void | enable () |
Enable the postprocessing pipeline. | |
void | disable () |
Disable the postprocessing pipeline. | |
bool | enabled () |
Check whether or not the postprocessing pipeline is enabled. | |
Protected Member Functions | |
virtual void | do_create (ID3D11Device *device) |
Overwrite this method to add your own creation code. | |
virtual void | do_destroy () |
Overwrite this to destroy additional resources created. | |
virtual void | do_set_shader (ID3D11Device *device) |
Overwrite this method to initializes further shader instances. | |
virtual void | do_resize (UINT width, UINT height) |
Overwrite this method to react to resizes. | |
void | godrays (ID3D11DeviceContext *context, dune::render_target &in, dune::render_target &out) |
Compute godrays on halfsize buffer. | |
void | render (ID3D11DeviceContext *context, ID3D11PixelShader *ps, dune::render_target &in, ID3D11RenderTargetView *out) |
Render the entire pipeline by switching back and forth between a two temporary buffers. | |
void | dof (ID3D11DeviceContext *context, dune::render_target &in, dune::render_target &out) |
Render depth of field and blur it. | |
void | dofblur (ID3D11DeviceContext *context, dune::render_target &in, dune::render_target &out) |
Render depth of field and blur it. | |
void | bloom (ID3D11DeviceContext *context, dune::render_target &frontbuffer) |
Render bloom and blur it. | |
void | bloomblur (ID3D11DeviceContext *context, dune::render_target &in, dune::render_target &out) |
Render bloom and blur it. | |
A default implementation of the postprocessor.
This is a default implementation of the postprocessor class. The output of a deferred renderer is rendered to the frontbuffer render_target of the postprocessor. Each postprocess effect is rendered by swapping input and output of the previous shader, until the last shader writes its output to the backbuffer provided to the postprocessor.
This postprocessor implements SSAO, Godrays, Depth-of-Field, Bloom, FXAA, exposure adaptation, a CRT monitor effect, TV grain and HDR rendering.