C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
VSN::RenderPostProcess Class Reference

RenderPostProcess class allows you to perform the final post-processing of the scene with a shader. More...

#include <vsn_renderpostprocess.h>

Public Member Functions

 RenderPostProcess (std::istream &pixelShader)
 Constructor.
 
 RenderPostProcess (std::istream &vertexShader, std::istream &pixelShader)
 Constructor.
 
 ~RenderPostProcess ()
 Destructor.
 
std::string GetErrorString () const
 Get compilation errors.
 
bool IsValid () const
 Check compilation success.
 
void AddTexture (const std::string &name, ColorsArray *colorsArray)
 Add texture.
 
void AddTexture (const std::string &name, Texture2D *texture)
 Add texture.
 
void AddTexture (const std::string &name, Texture3D *texture)
 Add texture.
 
void AddMatrix (const std::string &name, const Matrix3DF &matrix)
 Add matrix.
 
void AddUniformValue (const std::string &name, int value)
 Add value to set into shader.
 
void AddUniformArray (const std::string &name, const AttrUnitSizes components, const int *data, int count)
 Add array to set into shader. Same semantics as glUniform{1|2|3|4}{f|i|}v.
 

Detailed Description

RenderPostProcess class allows you to perform the final post-processing of the scene with a shader.

Values for the following variables are passed to the shader:
uniform sampler2D VSN_SCENE_COLOR_TEXTURE - texture with processed scene
uniform sampler2D VSN_SCENE_DEPTH_TEXTURE - texture containing scene depth buffer
varying vec2 VSN_TEXCOORD - texture coordinates
uniform mat4 VSN_VIEW_PROJECTION - product of projection and view matrices
uniform mat4 VSN_INV_VIEW_PROJECTION - matrix inverse to VSN_VIEW_PROJECTION
uniform vec2 VSN_SCREEN_SIZE - screen width and height
uniform vec2 VSN_INV_SCREEN_SIZE - inverted screen width and height


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