The Dirtchamber
A mixed reality testing environment for real-time global illumination algorithms
Public Member Functions | Protected Member Functions | List of all members
dune::postprocessor Class Reference

A base interface for a postprocessor pipeline. More...

#include <postprocess.h>

Inheritance diagram for dune::postprocessor:
pppipe

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.
 
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_targetfrontbuffer ()
 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.
 

Detailed Description

A base interface for a postprocessor pipeline.

This class defines a base interface for a postprocessing pipeline. A postprocessing pipline is activated by a deferred_renderer after the deferred render pass. It receives the deferred output as intial image and is expected to render its end result into a backbuffer render target view. Everything inbetween is dependend on the pipeline and can introduce as many render steps as needed.

Member Function Documentation

void dune::postprocessor::set_shader ( ID3D11Device *  device,
ID3DBlob *  input_binary,
ID3D11VertexShader *  fs_triangle,
UINT  buffers_start_slot 
)

Set shader parameters for the postprocessing pipeline.

The postprocessing pipeline needs several things in order to run: A fullscreen triangle with the matching shader input_binary and a start slot at which point to expect the frontbuffer (i.e the buffer into which the image just before postprocessing was rendered).

Parameters
deviceThe Direct3D device.
input_binaryThe input layout of the shader for the fullscreen triangle.
fs_triangleA vertex shader for a fullscreen triangle.
buffers_start_slotThe slot at which the shader expects the frontbuffer.

References do_set_shader(), and dune::d3d_mesh::set_shader().

Referenced by dc::common_renderer::set_shader().


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