The Dirtchamber
A mixed reality testing environment for real-time global illumination algorithms
Public Member Functions | Protected Member Functions | List of all members
dc::rsm_renderer< L > Class Template Reference

A common_renderer also rendering an RSM. More...

#include <common_renderer.h>

Inheritance diagram for dc::rsm_renderer< L >:
dc::common_renderer dune::deferred_renderer

Public Member Functions

void update_light_parameters (ID3D11DeviceContext *context, dune::directional_light &l)
 Update and upload parameters (view projection matrix, flux etc.) of a directional light.
 
virtual void save (dune::serializer &s)
 Saves dune objects used in the common_renderer. Overload to add more.
 
virtual void load (ID3D11DeviceContext *context, const dune::serializer &s)
 Load dune objects used in the common_renderer. Overload to add more.
 
- Public Member Functions inherited from dc::common_renderer
virtual void resize (UINT width, UINT height)
 Resize the deferred_renderer's output to a new width/height .
 
virtual void update_postprocessing_parameters (ID3D11DeviceContext *context)
 Upload postprocessing paraemters from the postporcessing pipeline.
 
virtual void update_frame (ID3D11DeviceContext *context, double time, float elapsed_time)
 Update function for everything called once a frame.
 
virtual void update_camera (ID3D11DeviceContext *context, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 Update function called for the camera.
 
virtual void reload_shader (ID3D11Device *device, ID3D11DeviceContext *context)
 A function called if the shaders should be reloaded.
 
void set_shader (ID3D11Device *device, ID3DBlob *input_binary, ID3D11VertexShader *vs_deferred, ID3D11PixelShader *ps_deferred, ID3D11PixelShader *ps_overlay, UINT start_slot, UINT overlay_slot, UINT postprocessing_slot)
 Set deferred rendering shaders. More...
 
- Public Member Functions inherited from dune::deferred_renderer
void start_capture (ID3D11Device *device, size_t width, size_t height, size_t fps)
 Capture the backbuffer and write it to an MP4 video file. More...
 
void stop_capture ()
 Stop capturing and finalize an MP4 video file.
 
const buffer_collection & buffers ()
 Returns the map containing all buffers indexed by their registers.
 
void add_buffer (gbuffer &buffer, UINT slot)
 Add a gbuffer to the deferred renderer buffer map. More...
 
void add_buffer (texture &target, UINT slot)
 Add a render_target to the buffer map.
 
void set_postprocessor (postprocessor *pp)
 Set a postprocessor to use. If this isn't called or set to nullptr, the deferred renderer output is displayed directly.
 
void show_target (ID3D11DeviceContext *context, const tstring &name)
 Select a render_target by name to display in a small overlay when rendering.
 

Protected Member Functions

void update_rsm_camera_parameters (ID3D11DeviceContext *context, dune::directional_light &l)
 Update and upload RSM camera parameters (i.e. light view projection matrix etc.).
 
void render_rsm (ID3D11DeviceContext *context, float *clear_color, dune::gbuffer &rsm)
 Render a scene from a directional_light position into an RSM.
 
virtual void do_render_rsm (ID3D11DeviceContext *context)
 Virtual function to render more stuff for the RSM.
 
- Protected Member Functions inherited from dc::common_renderer
virtual void do_render_scene (ID3D11DeviceContext *context)
 Derived classes can overload this method to call render() on more dune objects. Buffers etc. are all set up already.
 
void reset_omrtv (ID3D11DeviceContext *context)
 Resets all render target views to nullptr.
 
void update_bbox (ID3D11DeviceContext *context, dune::d3d_mesh &mesh)
 Upload the bounding box of a mesh to the pixel shader.
 
void update_camera_parameters (ID3D11DeviceContext *context)
 Upload camera parameters to the respective shaders.
 
void update_scene (ID3D11DeviceContext *context, const DirectX::XMMATRIX &world)
 Update the scene with a new model matrix to move/scale/... stuff.
 
void update_onetime_parameters (ID3D11DeviceContext *context, dune::d3d_mesh &mesh)
 Upload one-time parameters (really just once) such as noise textures.
 
void render_scene (ID3D11DeviceContext *context, float *clear_color, ID3D11DepthStencilView *dsv)
 Clear the GBufer and render the scene.
 
- Protected Member Functions inherited from dune::deferred_renderer
void overlay (ID3D11DeviceContext *context, ID3D11RenderTargetView *backbuffer)
 Render a selected target into a small preview window on top of the backbuffer.
 
void deferred (ID3D11DeviceContext *context, ID3D11RenderTargetView *backbuffer)
 Render the deferred pass with an optional postprocessing pass.
 

Detailed Description

template<typename L = dune::directional_light>
class dc::rsm_renderer< L >

A common_renderer also rendering an RSM.

The rsm_renderer derives from a common_renderer and adds one light source of type L. For this light source, an RSM is generated. Depending on the type of the light source, there may be two or more RSMs.


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