9 #include <glm/gtc/type_ptr.hpp> 11 #include "../shader.h" 12 #include "../texture.hpp" 52 int windowWidth, windowHeight;
55 float sampleDensityBias = 0.85f;
56 float sampleWeight = 5.00f;
57 float decayFactor = 0.98f;
58 float exposure = 0.0035f;
60 GLuint fboOccludedSky, occludedSkyColorTexture, occludedSkyDepthBuffer;
62 Shader *lightbeamsShader =
nullptr;
69 inline void bindOcclusionFrameBuffer() { bindFrameBuffer(fboOccludedSky, windowWidth, windowHeight); }
71 void bindFrameBuffer(GLuint frameBuffer,
int width,
int height);
72 void bindDefaultFrameBuffer();
74 Shader *setupLightbeamsShader(
const glm::vec3 &sunWorldPos,
const glm::mat4 &viewProjMat);
81 glm::vec2 worldToRelativeScreenSpace(
const glm::vec3 &worldPos,
const glm::mat4 &viewProjMat);
84 GLuint createFrameBuffer();
87 GLuint createColorTextureAttachment(
int width,
int height);
91 GLuint createDepthTextureAttachment(
int width,
int height);
96 GLuint createDepthRenderbufferAttachment(
int width,
int height);
Shader class.
Definition: shader.h:15
LightbeamsEffect Based on Kenny Mitchell "Volumetric Light Scattering as a Post-Process" http://http...
Definition: lightbeams_effect.h:47
LightbeamsEffect(int windowWidth, int windowHeight)
Definition: lightbeams_effect.cpp:3