Colors above value 1 is now added to the bloomtexture, and will be used to get a glow effect in later stage.

This commit is contained in:
Tleety
2016-01-20 15:23:49 +01:00
parent 78a1037983
commit 86824f1b1f
5 changed files with 12 additions and 14 deletions
+2 -1
View File
@@ -27,6 +27,7 @@ void DrawFinalPass::InitializeFrameBuffers()
m_BloomFrameBuffer.AddResource(std::shared_ptr<BufferResource>(new Texture2D(&m_SceneTexture, GL_COLOR_ATTACHMENT0)));
m_BloomFrameBuffer.AddResource(std::shared_ptr<BufferResource>(new Texture2D(&m_BloomTexture, GL_COLOR_ATTACHMENT1)));
m_BloomFrameBuffer.Generate();
}
void DrawFinalPass::InitializeShaderPrograms()
@@ -79,8 +80,8 @@ void DrawFinalPass::Draw(RenderScene& scene)
continue;
}
}
m_BloomFrameBuffer.Unbind();
GLERROR("DrawFinalPass::Draw: END");
}
void DrawFinalPass::GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) const