8 #include <GLFW/glfw3.h> 10 #include <glm/gtc/type_ptr.hpp> 12 #include "../shader.h" 23 GLuint fboScreenData, screenColorTexture, viewPosTexture, screenDepthBuffer;
24 GLuint fboSSAO, ssaoTexture;
25 GLuint fboSSAOBlurPingpong, ssaoBlurredTexturePingpong;
27 GLuint screenQuadVAO, screenQuadVBO;
29 Shader *ssaoShader =
nullptr;
30 Shader *blurShader =
nullptr;
40 SSAOEffect(
int windowWidth,
int windowHeight,
int samples_);
72 void blurSSAOResultTexture();
void bindScreenDataFramebuffer()
bind framebuffer in which screen colors and view space vertex positions should be stored for ssao pos...
Definition: ssao_effect.cpp:190
Shader class.
Definition: shader.h:15
SSAOEffect(int windowWidth, int windowHeight, int samples_)
Definition: ssao_effect.cpp:15
The SSAOEffect class facilitates Screen Space Ambient Occlusion using a two pass rendering pipeline...
Definition: ssao_effect.h:21
void setupFramebuffers(int windowWidth, int windowHeight)
setup framebuffers and their screen filling texture or renderbuffer attachments
Definition: ssao_effect.cpp:106
void calulateSSAOValues(const glm::mat4 &projMat)
calulate the resulting ssao factors for each fragment and store it in a texture attached to the fboSS...
Definition: ssao_effect.cpp:198
void bindSSAOResultTexture(GLint ssaoTexShaderLocation, GLuint textureUnit)
bind the texture which stores the ssao results after calulateSSAOValues to given shader locaton and t...
Definition: ssao_effect.cpp:245