|
Volume Renderer DoF
|
#include <DoFShader.h>
Public Member Functions | |
| DoFShader () | |
| ~DoFShader () | |
| void | draw (FBO *fbo0, FBO *fbo1, float C, bool f2b) |
| void | loadDepth (float depthZCoord, float distance) |
| void | prepare (GLCamera &camera, const GLuint &quadVAO, const GLuint &volTEX) |
| void | cleanUp () |
| void | refresh () |
Public Member Functions inherited from GLShader | |
| GLShader (const QString &_vertex, const QString &_fragment) | |
| ~GLShader () | |
| void | prepare (const GLuint &vao) |
| void | cleanUp () |
| const bool | isRenderable () const |
Additional Inherited Members | |
Protected Member Functions inherited from GLShader | |
| void | createShader (const QString &_vertex, const QString &_fragment) |
Protected Attributes inherited from GLShader | |
| QOpenGLShaderProgram * | linker |
| GLuint | program |
| GLboolean | renderable |
A class for rendering the DoF effect
| DoFShader::DoFShader | ( | ) |
| DoFShader::~DoFShader | ( | ) |
| void DoFShader::cleanUp | ( | ) |
unbind everything
renders a slice of the volume
| fbo0 | previous framebuffer |
| fbo1 | current framebuffer |
| C | circle of confusion |
| f2b | bool indicating if rendered front to back or back to front |
| void DoFShader::loadDepth | ( | float | depthZCoord, |
| float | distance | ||
| ) |
loads up the depth values to the shader
| depthZCoord | distance from camera to slice |
| distance | distance between slices |
| void DoFShader::prepare | ( | GLCamera & | camera, |
| const GLuint & | quadVAO, | ||
| const GLuint & | volTEX | ||
| ) |
bind matrices, VAO and texture
| camera | contains model, view, projection matrices |
| quadVAO | VAO for a simple quad |
| volTEX | ID for the current volume slice |
| void DoFShader::refresh | ( | ) |
recompile the shader, for debugging