61 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Render-SSAO")
66 void log(
Logtype _type, QString _message);
67 void log(QString _message);
75 QString
name() {
return (QString(
"SSAO Plugin")); };
76 QString
description( ) {
return (QString(tr(
"Screen Space Ambient Occlusion"))); };
79 QString version() {
return QString(
"1.0"); };
84 void initializePlugin();
89 QString rendererName();
91 QString checkOpenGL();
102 void reloadResources(
int _viewerId,
unsigned int _sceneTexWidth,
unsigned int _sceneTexHeight);
106 float _w = 2.0f,
float _h = 2.0f);
113 GLSL::StringList* _strFragmentShaderOut,
bool _textured);
120 void gaussianBlurPass(
const ViewerResources* _pViewer,
const float* _texelSize,
121 GLenum _targetAttachement, GLuint _srcTexture);
190 std::map<int, ViewerResources> viewerRes_;
void generatePeelingShaders(GLSL::StringList *_strVertexShaderOut, GLSL::StringList *_strFragmentShaderOut, bool _textured)
peel shader generator based on lights and texture mode
unsigned int glHeight_
viewer window height
GLuint depthSceneRenderBuf_
depth renderbuffer for sceneFbo
static const unsigned int numSamples_
number of samples
void drawScenePass(ACG::GLState *_glState, Viewer::ViewerProperties &_properties, BaseNode *_sceneGraphRoot)
draw the current scene
unsigned int glWidth_
viewer window width
GLuint downsampledTex_
downsampled depth render target
Logtype
Log types for Message Window.
unsigned int rtDownHeight_
downsampled rt height
GLuint depthBufTex_
depth buffer render target
GLuint downsampledTmpTex_
downsampled temp rt for intermediate results
Interface for all Plugins which do logging to the logging window of the framework.
void traverseLightNodes(BaseNode *_node)
find all light nodes in the scene
ACG::Vec3f samplingKernel_[128]
ssao sampling kernel
GLuint sceneBufTex_
standard scene without a render target
QString name()
Return a name for the plugin.
unsigned int rtWidth_
render target width
GLuint depthSSAORenderBuf_
depth renderbuffer for ssaoFbo
GLuint occlusionTex_
occlusion render target
QString description()
Return a description of what the plugin is doing.
unsigned int rtSceneHeight_
scene render target height
void drawQuadProj(float _x0=-1.0f, float _y0=1.0f, float _w=2.0f, float _h=2.0f)
draw a quad in projection space (only positions)
void generateSamplingKernel()
computes a hemisphere sampling kernel in [0,1] range
GLSL::Shader * shaders_[10]
shader resources
A generic shader base class.
unsigned int rtHeight_
render target height
GLuint randomVecTex_
random vector table for sample offset rotation
unsigned int rtDownWidth_
downsampled rt width
void destroyResources()
free all gl resources
GLSL::Program * programs_[6]
shader programs
Interface to add additional rendering functions from within plugins.
unsigned int rtSceneWidth_
scene render target width
void reloadResources(int _viewerId, unsigned int _sceneTexWidth, unsigned int _sceneTexHeight)
reload gl resources
Interface class from which all plugins have to be created.