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