diff options
Diffstat (limited to 'KaplaDemo/samples/sampleViewer3/SSAOHelper.h')
| -rw-r--r-- | KaplaDemo/samples/sampleViewer3/SSAOHelper.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/KaplaDemo/samples/sampleViewer3/SSAOHelper.h b/KaplaDemo/samples/sampleViewer3/SSAOHelper.h new file mode 100644 index 00000000..7fd63849 --- /dev/null +++ b/KaplaDemo/samples/sampleViewer3/SSAOHelper.h @@ -0,0 +1,25 @@ +#pragma once +#include <GL/glew.h> +#include "Shader.h" +#define SAMPLEDIV 4 +#define NUMSAMPLES SAMPLEDIV*SAMPLEDIV + +class SSAOHelper{ +public: + int Width, Height; + float padding; + int SWidth, SHeight; + float fov; + float fovPad; + float zNear, zFar; + float scale; + int realWidth, realHeight; + + Shader SSAO, SSAOFilterH, SSAOFilterV; + SSAOHelper(float fov, float padding, float zNear, float zFar, const char* resourcePath, float scale); + void Resize(int w, int h); + + void DoSSAO(void (*renderScene)(), GLuint oldFBO = 0); + void Destroy(); + GLuint FBO, unitVecTex, normalTex, depthTex, ssaoTex, blurTex; +}; |